literals: change ${ } to be the executable code arrays.
parent
ffa742c7f8
commit
e501f61141
|
@ -23,6 +23,11 @@ IN: literals.tests
|
|||
CONSTANT: constant-a 3
|
||||
|
||||
[ { 3 10 "ftw" } ] [ ${ constant-a 10 "ftw" } ] unit-test
|
||||
{ { 4 } } [ ${ 1 constant-a + } ] unit-test
|
||||
{ { 3 } } [ ${ 1 2 + } ] unit-test
|
||||
{ { 1 2 \ + } } [ ${ 1 2 \ + } ] unit-test
|
||||
{ { 4 } } [ ${ 1 2 + 1 + } ] unit-test
|
||||
{ { 1 3 } } [ ${ 1 2 1 + } ] unit-test
|
||||
|
||||
: sixty-nine ( -- a b ) 6 9 ;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ IN: literals
|
|||
] with-datastack ;
|
||||
|
||||
: expand-literals ( seq -- seq' )
|
||||
[ [ { } ] dip expand-literal ] map concat ;
|
||||
{ } [ expand-literal ] reduce ;
|
||||
|
||||
PRIVATE>
|
||||
|
||||
|
|
Loading…
Reference in New Issue