From 5875d0352db1df19e7fe85c2807bdf82958420ce Mon Sep 17 00:00:00 2001 From: Jon Harper Date: Sat, 4 Aug 2012 22:25:03 +0200 Subject: [PATCH] cleanup: with fry, _ call is @ --- extra/rosetta-code/y-combinator/y-combinator.factor | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extra/rosetta-code/y-combinator/y-combinator.factor b/extra/rosetta-code/y-combinator/y-combinator.factor index c32cf7209f..96dc2d3d9a 100644 --- a/extra/rosetta-code/y-combinator/y-combinator.factor +++ b/extra/rosetta-code/y-combinator/y-combinator.factor @@ -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 ] ;