SYMBOLS: a b c d e f g h ;
+[ [ ] ] [ '[ ] ] unit-test
+[ [ + ] ] [ '[ + ] ] unit-test
[ [ 1 ] ] [ 1 '[ _ ] ] unit-test
[ [ 1 ] ] [ [ 1 ] '[ @ ] ] unit-test
[ [ 1 2 ] ] [ [ 1 ] [ 2 ] '[ @ @ ] ] unit-test
PRIVATE>
M: callable fry ( quot -- quot' )
- 0 swap <dredge-fry>
- [ dredge-fry ] [
- [ prequot>> >quotation ]
- [ quot>> >quotation shallow-fry ] bi append
- ] bi ;
+ [ [ [ ] ] ] [
+ 0 swap <dredge-fry>
+ [ dredge-fry ] [
+ [ prequot>> >quotation ]
+ [ quot>> >quotation shallow-fry ] bi append
+ ] bi
+ ] if-empty ;
SYNTAX: '[ parse-quotation fry append! ;