Partial function application: Difference between revisions
Content added Content deleted
(Added Quackery.) |
|||
Line 1,879: | Line 1,879: | ||
do ] is fs ( f s --> [ ) |
do ] is fs ( f s --> [ ) |
||
[ 2 * ] is f1 ( n --> n ) |
[ 2 * ] is f1 ( n --> n ) |
||
[ 2 ** ] is f2 ( n --> n ) |
[ 2 ** ] is f2 ( n --> n ) |
||
[ ' f1 swap fs ] is fsf1 ( s --> [ ) |
[ ' f1 swap fs ] is fsf1 ( s --> [ ) |
||
[ ' f2 swap fs ] is fsf2 ( s --> [ ) |
[ ' f2 swap fs ] is fsf2 ( s --> [ ) |
||
' [ 0 1 2 3 ] fsf1 echo cr |
' [ 0 1 2 3 ] fsf1 echo cr |
||
Line 1,892: | Line 1,892: | ||
' [ 2 4 6 8 ] fsf2 echo cr |
' [ 2 4 6 8 ] fsf2 echo cr |
||
( ... or, using Quackery's partial applicator "witheach" |
( ... or, using Quackery's partial applicator "witheach", |
||
which applies the word or nest following it to each |
|||
item in a nest on the top of the stack ... ) |
|||
cr |
cr |