Re:Don’t Be Scared Of Functional Programming
by mneary on Wednesday July 02, 2014 @02:34PM
(#7978738)
Function composition is a single, special case of a function accepting functional arguments. You could define the compose operator as below:
However, there is a whole spectrum of additionally possible functions which can be built to accept functions as arguments. Here's a couple of example:
The first one takes a function and applies an argument, 3; the next one takes a list and a function and maps the list using the provided function. The idea of functions as arguments is a very powerful one, and from my understanding one with which people sometimes struggle.
[ Parent
| on HN ]
There are no comments on this comment yet.