USING: arrays kernel math namespaces sequences kernel.private
-sequences.private strings sbufs tools.test vectors
+sequences.private strings sbufs tools.test vectors assocs
generic vocabs.loader ;
IN: sequences.tests
[ 5040 ] [ [ 1 2 3 4 5 6 7 ] 1 [ * ] reduce ] unit-test
-[ 5040 [ 1 1 2 6 24 120 720 ] ]
-[ [ 1 2 3 4 5 6 7 ] 1 [ * ] accumulate ] unit-test
+[ 5040 { 1 1 2 6 24 120 720 } ]
+[ { 1 2 3 4 5 6 7 } 1 [ * ] accumulate ] unit-test
[ f f ] [ [ ] [ ] find ] unit-test
[ 0 1 ] [ [ 1 ] [ ] find ] unit-test
[ -1./0. 0 delete-nth ] must-fail
[ "" ] [ "" [ CHAR: \s = ] trim ] unit-test
-[ "" ] [ "" [ CHAR: \s = ] trim-left ] unit-test
-[ "" ] [ "" [ CHAR: \s = ] trim-right ] unit-test
-[ "" ] [ " " [ CHAR: \s = ] trim-left ] unit-test
-[ "" ] [ " " [ CHAR: \s = ] trim-right ] unit-test
+[ "" ] [ "" [ CHAR: \s = ] trim-head ] unit-test
+[ "" ] [ "" [ CHAR: \s = ] trim-tail ] unit-test
+[ "" ] [ " " [ CHAR: \s = ] trim-head ] unit-test
+[ "" ] [ " " [ CHAR: \s = ] trim-tail ] unit-test
[ "asdf" ] [ " asdf " [ CHAR: \s = ] trim ] unit-test
-[ "asdf " ] [ " asdf " [ CHAR: \s = ] trim-left ] unit-test
-[ " asdf" ] [ " asdf " [ CHAR: \s = ] trim-right ] unit-test
+[ "asdf " ] [ " asdf " [ CHAR: \s = ] trim-head ] unit-test
+[ " asdf" ] [ " asdf " [ CHAR: \s = ] trim-tail ] unit-test
[ 328350 ] [ 100 [ sq ] sigma ] unit-test
[ "asdf" iota ] must-fail
[ T{ iota { n 10 } } ] [ 10 iota ] unit-test
[ 0 ] [ 10 iota first ] unit-test
+
+[ "hi" 3 ] [
+ { 1 2 3 4 5 6 7 8 } [ H{ { 3 "hi" } } at ] map-find
+] unit-test
+
+[ f f ] [
+ { 1 2 3 4 5 6 7 8 } [ H{ { 11 "hi" } } at ] map-find
+] unit-test