Content deleted Content added
→Unix pipeline: named pipes are *named*, hence not point-free |
→Functional programming: more matter less art |
||
Line 33:
===Functional programming===
A simple example (in [[Haskell (programming language)|Haskell]]) is a program which
<syntaxhighlight lang="haskell">
sum (x:xs) = x + sum xs
Line 39:
</syntaxhighlight>
However,
<syntaxhighlight lang="haskell">
sum xs = foldr (+) 0 xs
</syntaxhighlight>
And then the argument is not needed, so this
<syntaxhighlight lang="haskell">
sum = foldr (+) 0
|