Content deleted Content added
direct links |
→Example: inspired? => either like or style is more clear |
||
Line 17:
===Example===
The following [[Haskell (programming language)|Haskell]]-
compose f g = λx → f (g x)
<code>[[Lambda calculus|λ]]</code> is the operator for constructing a new function, which in this case has one argument, <code>x</code>, and returns the result of first applying <code>g</code> to <code>x</code>, then applying <code>f</code> to that. This λ function carries the functions <code>f</code> and <code>g</code> (or pointers to them) as internal state.
|