cleanup: with fry, _ call is @
parent
87aeec7c63
commit
e980e26f70
|
@ -24,8 +24,10 @@ IN: rosetta-code.y-combinator
|
|||
: Y ( quot -- quot )
|
||||
'[ [ dup call call ] curry @ ] dup call ; inline
|
||||
|
||||
! factorial sequence
|
||||
: almost-fac ( quot -- quot )
|
||||
'[ dup zero? [ drop 1 ] [ dup 1 - _ call * ] if ] ;
|
||||
'[ dup zero? [ drop 1 ] [ dup 1 - @ * ] if ] ;
|
||||
|
||||
! fibonacci sequence
|
||||
: almost-fib ( quot -- quot )
|
||||
'[ dup 2 >= [ 1 2 [ - _ call ] bi-curry@ bi + ] when ] ;
|
||||
'[ dup 2 >= [ 1 2 [ - @ ] bi-curry@ bi + ] when ] ;
|
||||
|
|
Loading…
Reference in New Issue