Created
January 23, 2014 22:57
-
-
Save rdm/8588513 to your computer and use it in GitHub Desktop.
example of gerunds as first order functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ing=: `'' | |
evoke=:adverb define NB. ( | |
'`yes please'=. ,&<~m | |
please f. | |
) | |
apply=:dyad define NB. ( | |
(x evoke)@(y evoke) ing | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f1=: 2&* ing | |
f2=: 3&+ ing | |
NB. result is another function: | |
f1 apply f2 | |
NB. result is 26: | |
(f1 apply f2) evoke 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment