USING: arrays byte-arrays kernel kernel.private math memory
namespaces sequences tools.test math.private quotations
-continuations prettyprint io.streams.string debugger assocs ;
+continuations prettyprint io.streams.string debugger assocs
+sequences.private ;
IN: kernel.tests
[ 0 ] [ f size ] unit-test
[ total-failure-1 ] must-fail
-! From combinators.lib
[ 1 1 2 2 3 3 ] [ 1 2 3 [ dup ] tri@ ] unit-test
[ 1 4 9 ] [ 1 2 3 [ sq ] tri@ ] unit-test
[ [ sq ] tri@ ] must-infer
+
+[ 4 ] [ 1 { [ 1 ] [ 2 ] } dispatch sq ] unit-test
: set-array-nth ( elt n array -- )
swap 2 fixnum+fast set-slot ; inline
-: dispatch ( n array -- ) array-nth (call) ;
+: dispatch ( n array -- ) array-nth call ;
GENERIC: resize ( n seq -- newseq ) flushable