Skip to content

Instantly share code, notes, and snippets.

@rdm
Created January 23, 2014 22:57
Show Gist options
  • Save rdm/8588513 to your computer and use it in GitHub Desktop.
Save rdm/8588513 to your computer and use it in GitHub Desktop.
example of gerunds as first order functions
ing=: `''
evoke=:adverb define NB. (
'`yes please'=. ,&<~m
please f.
)
apply=:dyad define NB. (
(x evoke)@(y evoke) ing
)
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