1 USING: kernel math quotations.private sequences tools.test ;
4 { [ 3 ] } [ 3 [ ] curry ] unit-test
5 { [ \ + ] } [ \ + [ ] curry ] unit-test
6 { [ \ + = ] } [ \ + [ = ] curry ] unit-test
9 { 1 2 3 } [ [ + ] curry ] map concat
12 { [ 1 2 3 4 ] } [ [ 1 2 ] [ 3 4 ] append ] unit-test
13 { [ 1 2 3 ] } [ [ 1 2 ] 3 suffix ] unit-test
14 { [ 3 1 2 ] } [ [ 1 2 ] 3 prefix ] unit-test
16 { [ "hi" ] } [ "hi" 1quotation ] unit-test
18 [ 1 \ + curry ] must-fail
20 : trouble ( -- arr quot ) { 123 } dup array>quotation ;
23 ! Call the quotation which compiles it.
25 ! Change the array used for it.