curry and compose now check their inputs

db4
Slava Pestov 2008-11-21 04:37:17 -06:00
parent 883ad5389c
commit 89440b2a23
2 changed files with 18 additions and 3 deletions

View File

@ -303,7 +303,13 @@ tuple
[ f "inline" set-word-prop ]
[ make-flushable ]
[ ]
[ tuple-layout [ <tuple-boa> ] curry ]
[
[
callable instance-check-quot %
tuple-layout ,
\ <tuple-boa> ,
] [ ] make
]
} cleave
(( obj quot -- curry )) define-declared
@ -319,7 +325,16 @@ tuple
[ f "inline" set-word-prop ]
[ make-flushable ]
[ ]
[ tuple-layout [ <tuple-boa> ] curry ]
[
[
\ >r ,
callable instance-check-quot %
\ r> ,
callable instance-check-quot %
tuple-layout ,
\ <tuple-boa> ,
] [ ] make
]
} cleave
(( quot1 quot2 -- compose )) define-declared

View File

@ -15,4 +15,4 @@ IN: quotations.tests
[ [ "hi" ] ] [ "hi" 1quotation ] unit-test
! [ 1 \ + curry ] must-fail
[ 1 \ + curry ] must-fail