Merge branch 'master' of git://factorcode.org/git/factor
commit
1c312638c5
|
@ -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 ] }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue