'[ ] should make an empty quot
parent
eac9bacf40
commit
324889e2ac
|
@ -5,6 +5,8 @@ IN: fry.tests
|
||||||
|
|
||||||
SYMBOLS: a b c d e f g h ;
|
SYMBOLS: a b c d e f g h ;
|
||||||
|
|
||||||
|
[ [ ] ] [ '[ ] ] unit-test
|
||||||
|
[ [ + ] ] [ '[ + ] ] unit-test
|
||||||
[ [ 1 ] ] [ 1 '[ _ ] ] unit-test
|
[ [ 1 ] ] [ 1 '[ _ ] ] unit-test
|
||||||
[ [ 1 ] ] [ [ 1 ] '[ @ ] ] unit-test
|
[ [ 1 ] ] [ [ 1 ] '[ @ ] ] unit-test
|
||||||
[ [ 1 2 ] ] [ [ 1 ] [ 2 ] '[ @ @ ] ] unit-test
|
[ [ 1 2 ] ] [ [ 1 ] [ 2 ] '[ @ @ ] ] unit-test
|
||||||
|
|
|
@ -136,10 +136,12 @@ TUPLE: dredge-fry-state
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
M: callable fry ( quot -- quot' )
|
M: callable fry ( quot -- quot' )
|
||||||
|
[ [ [ ] ] ] [
|
||||||
0 swap <dredge-fry>
|
0 swap <dredge-fry>
|
||||||
[ dredge-fry ] [
|
[ dredge-fry ] [
|
||||||
[ prequot>> >quotation ]
|
[ prequot>> >quotation ]
|
||||||
[ quot>> >quotation shallow-fry ] bi append
|
[ quot>> >quotation shallow-fry ] bi append
|
||||||
] bi ;
|
] bi
|
||||||
|
] if-empty ;
|
||||||
|
|
||||||
SYNTAX: '[ parse-quotation fry append! ;
|
SYNTAX: '[ parse-quotation fry append! ;
|
||||||
|
|
Loading…
Reference in New Issue