码迷,mamicode.com
首页 > 其他好文 > 详细

Functional programming

时间:2016-10-21 23:47:33      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:eval   tle   ica   app   sam   nbsp   tab   void   output   

https://en.wikipedia.org/wiki/Functional_programming

In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative programming paradigm, which means programming is done withexpressions[1] or declarations[2] instead of statements. In functional code, the output value of a function depends only on the arguments that are input to the function, so calling a function f twice with the same value for an argument x will produce the same result f(x) each time. Eliminating side effects, i.e. changes in state that do not depend on the function inputs, can make it much easier to understand and predict the behavior of a program, which is one of the key motivations for the development of functional programming.

Functional programming

标签:eval   tle   ica   app   sam   nbsp   tab   void   output   

原文地址:http://www.cnblogs.com/yuanjiangw/p/5986288.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!