diff --git a/extra/sequences/lib/lib-tests.factor b/extra/sequences/lib/lib-tests.factor index a44d41d98a..509d9b1432 100755 --- a/extra/sequences/lib/lib-tests.factor +++ b/extra/sequences/lib/lib-tests.factor @@ -47,13 +47,6 @@ IN: sequences.lib.tests [ t ] [ "ab" 4 strings [ >string ] map "abab" swap member? ] unit-test [ { { } { 1 } { 2 } { 1 2 } } ] [ { 1 2 } power-set ] unit-test -[ f ] [ { } ?first ] unit-test -[ f ] [ { } ?fourth ] unit-test -[ 1 ] [ { 1 2 3 } ?first ] unit-test -[ 2 ] [ { 1 2 3 } ?second ] unit-test -[ 3 ] [ { 1 2 3 } ?third ] unit-test -[ f ] [ { 1 2 3 } ?fourth ] unit-test - [ 1 2 { 3 4 } [ + + ] 2 map-withn ] must-infer { { 6 7 } } [ 1 2 { 3 4 } [ + + ] 2 map-withn ] unit-test { { 16 17 18 19 20 } } [ 1 2 3 4 { 6 7 8 9 10 } [ + + + + ] 4 map-withn ] unit-test diff --git a/extra/sequences/lib/lib.factor b/extra/sequences/lib/lib.factor index fe9d9bb587..ed7f40598c 100755 --- a/extra/sequences/lib/lib.factor +++ b/extra/sequences/lib/lib.factor @@ -131,15 +131,6 @@ PRIVATE> : power-set ( seq -- subsets ) 2 over length exact-number-strings swap [ switches ] curry map ; -: ?first ( seq -- first/f ) 0 swap ?nth ; inline -: ?second ( seq -- second/f ) 1 swap ?nth ; inline -: ?third ( seq -- third/f ) 2 swap ?nth ; inline -: ?fourth ( seq -- fourth/f ) 3 swap ?nth ; inline - -: ?first2 ( seq -- 1st/f 2nd/f ) dup ?first swap ?second ; inline -: ?first3 ( seq -- 1st/f 2nd/f 3rd/f ) dup ?first2 rot ?third ; inline -: ?first4 ( seq -- 1st/f 2nd/f 3rd/f 4th/f ) dup ?first3 roll ?fourth ; inline - USE: continuations : ?subseq ( from to seq -- subseq ) >r >r 0 max r> r>