ensure accumulator comes back as a vector from literals
parent
217d4c4bc0
commit
8bb9429589
|
@ -11,4 +11,10 @@ IN: literals.tests
|
|||
[ { 7 11 } ] [ { $ seven-eleven } ] unit-test
|
||||
[ { 6 6 6 } ] [ { $ six-six-six } ] unit-test
|
||||
|
||||
[ { 6 6 6 7 } ] [ { $ six-six-six 7 } ] unit-test
|
||||
|
||||
[ { 8 8 8 } ] [ { $[ six-six-six [ 2 + ] tri@ ] } ] unit-test
|
||||
|
||||
[ { 0.5 2.0 } ] [ { $[ 1.0 2.0 / ] 2.0 } ] unit-test
|
||||
|
||||
[ { 1.0 { 0.5 1.5 } 4.0 } ] [ { 1.0 { $[ 1.0 2.0 / ] 1.5 } $[ 2.0 2.0 * ] } ] unit-test
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
! (c) Joe Groff, see license for details
|
||||
USING: continuations kernel parser words quotations ;
|
||||
USING: continuations kernel parser words quotations vectors ;
|
||||
IN: literals
|
||||
|
||||
: $ scan-word [ execute ] curry with-datastack ; parsing
|
||||
: $[ \ ] parse-until >quotation with-datastack ; parsing
|
||||
: $ scan-word [ execute ] curry with-datastack >vector ; parsing
|
||||
: $[ \ ] parse-until >quotation with-datastack >vector ; parsing
|
||||
|
|
Loading…
Reference in New Issue