Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2009-11-09 00:55:50 -06:00
commit 1c312638c5
2 changed files with 5 additions and 2 deletions

View File

@ -38,12 +38,15 @@ INSTANCE: fried-callable fried
[ [ \ 3curry suffix! ] dip 3 - (ncurry) ]
} case ;
: wrap-non-callable ( obj -- quot )
dup callable? [ ] [ [ call ] curry ] if ; inline
: [ncurry] ( n -- quot )
[ V{ } clone ] dip (ncurry) >quotation ;
: [ndip] ( quot n -- quot' )
{
{ 0 [ ] }
{ 0 [ wrap-non-callable ] }
{ 1 [ \ dip [ ] 2sequence ] }
{ 2 [ \ 2dip [ ] 2sequence ] }
{ 3 [ \ 3dip [ ] 2sequence ] }

View File

@ -389,7 +389,7 @@ M:: integer lambda-method-forget-test ( a -- b ) a ;
eval( -- ) call
] [ error>> >r/r>-in-fry-error? ] must-fail-with
:: (funny-macro-test) ( obj quot -- ? ) obj { quot } 1&& ; inline
:: (funny-macro-test) ( obj quot -- ? ) obj { [ quot call ] } 1&& ; inline
: funny-macro-test ( n -- ? ) [ odd? ] (funny-macro-test) ;
\ funny-macro-test def>> must-infer