diff --git a/basis/sequences/generalizations/generalizations.factor b/basis/sequences/generalizations/generalizations.factor index 207d7e8393..5290e60777 100644 --- a/basis/sequences/generalizations/generalizations.factor +++ b/basis/sequences/generalizations/generalizations.factor @@ -1,7 +1,8 @@ ! Copyright (C) 2009 Joe Groff. ! See http://factorcode.org/license.txt for BSD license. -USING: combinators fry generalizations kernel macros math -math.order memoize.private sequences sequences.private ; +USING: arrays combinators fry generalizations kernel macros math +math.order memoize.private quotations sequences +sequences.private ; IN: sequences.generalizations MACRO: (nsequence) ( n -- quot ) @@ -128,10 +129,10 @@ MACRO: nmap-reduce ( map-quot reduce-quot n -- quot ) (neach) all-integers? ; inline MACRO: finish-nfind ( n -- quot ) - [ 1 + ] keep dup dup dup '[ + [ 1 + ] keep dup dup dup f >quotation '[ _ npick [ [ dup ] _ ndip _ nnth-unsafe ] - [ _ ndrop _ [ f ] times ] + [ _ ndrop @ ] if ] ;