1 USING: combinators.lib kernel math random sequences tools.test continuations
3 IN: combinators.lib.tests
5 [ 6 -1 ] [ 5 0 1 [ + ] [ - ] bi, bi* ] unit-test
6 [ 6 -1 1 ] [ 5 0 1 1 [ + ] [ - ] [ * ] tri, tri* ] unit-test
8 [ 5 4 ] [ 5 0 1 [ + ] [ - ] bi*, bi ] unit-test
9 [ 5 4 5 ] [ 5 0 1 1 [ + ] [ - ] [ * ] tri*, tri ] unit-test
11 [ 5 6 ] [ 5 0 1 [ + ] bi@, bi ] unit-test
12 [ 5 6 7 ] [ 5 0 1 2 [ + ] tri@, tri ] unit-test
14 [ 5 ] [ [ 10 random ] [ 5 = ] generate ] unit-test
15 [ t ] [ [ 10 random ] [ even? ] generate even? ] unit-test
19 { "oof" "bar" } { [ reverse ] [ "x" dup surround ] } parallel-call
23 [ even? ] [ drop 1 ] [ drop 2 ] ifte