2 USING: fry tools.test math prettyprint kernel io arrays
5 [ [ 3 + ] ] [ 3 '[ , + ] ] unit-test
7 [ [ 1 3 + ] ] [ 1 3 '[ , , + ] ] unit-test
9 [ [ 1 + ] ] [ 1 [ + ] '[ , @ ] ] unit-test
11 [ [ 1 + . ] ] [ 1 [ + ] '[ , @ . ] ] unit-test
13 [ [ + - ] ] [ [ + ] [ - ] '[ @ @ ] ] unit-test
15 [ [ "a" write "b" print ] ]
16 [ "a" "b" '[ , write , print ] ] unit-test
19 [ [ + ] [ - ] '[ 1 2 @ 3 4 @ ] ] unit-test
22 1 '[ [ , ] dip / ] 2 swap call
25 [ { { 1 "a" "A" } { 1 "b" "B" } { 1 "c" "C" } } ] [
26 1 '[ [ , ] 2dip 3array ]
27 { "a" "b" "c" } { "A" "B" "C" } rot 2map
30 [ { { 1 "a" } { 1 "b" } { 1 "c" } } ] [
32 { "a" "b" "c" } swap map
35 [ { { 1 "a" 2 } { 1 "b" 2 } { 1 "c" 2 } } ] [
36 1 2 '[ [ , ] dip , 3array ]
37 { "a" "b" "c" } swap map
40 : funny-dip '[ [ @ ] dip ] call ; inline
42 [ "hi" 3 ] [ "h" "i" 3 [ append ] funny-dip ] unit-test
45 3 1 '[ , [ , + ] map ] call
48 [ { 1 { 2 { 3 } } } ] [
49 1 2 3 '[ , [ , [ , 1array ] call 2array ] call 2array ] call
52 { 1 1 } [ '[ [ [ , ] ] ] ] must-infer-as
55 3 '[ [ [ , 1array ] call 1array ] call 1array ] call
59 3 '[ [ [ , 1array ] call 1array ] call 1array ] call