Content deleted Content added
Mitch Ames (talk | contribs) →See also: Remove recently unlinked item: Comparison of programming paradigms |
Guy Harris (talk | contribs) →Lisp: Get rid of unnecessary piping. Use "such as", not "like", for examples. |
||
Line 60:
===Lisp===
[[Lisp (programming language) |Lisp]] is a family of programming languages loosely inspired by mathematical notation and [[Alonzo Church]]'s [[lambda calculus]]. Some dialects,
In Scheme, the [[factorial]] function can be defined as follows:
Line 73:
This defines the factorial function using its recursive definition. In contrast, it is more typical to define a procedure for an imperative language.
In lisps and lambda calculus, functions are generally [[first-class citizen
For example, writing a function to output the first n [[
<syntaxhighlight lang=scheme>
Line 84:
</syntaxhighlight>
The [[Map (higher-order function) |map]] function accepts a function and a list; the output is a list of results of the input function on each element of the input list.
===ML===
|