RosettaCodeData/Task/Y-combinator/Forth/y-combinator-1.fth
2024-03-06 22:25:12 -08:00

9 lines
269 B
Forth

\ Begin of approach. Depends on 'latestxt' word of GForth implementation.
: self-parameter ( xt -- xt' )
>r :noname latestxt postpone literal r> compile, postpone ;
;
: Y ( xt -- xt' )
dup self-parameter 2>r
:noname 2r> postpone literal compile, postpone ;
;