From 50e3d36d8ea6f293808888caac88269812afa113 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 13 Apr 2008 01:23:08 -0500 Subject: [PATCH] Fix nths --- extra/sequences/lib/lib.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/sequences/lib/lib.factor b/extra/sequences/lib/lib.factor index 0221d9b99a..15983329d6 100755 --- a/extra/sequences/lib/lib.factor +++ b/extra/sequences/lib/lib.factor @@ -227,8 +227,8 @@ PRIVATE> : ?nth* ( n seq -- elt/f ? ) 2dup bounds-check? [ nth-unsafe t ] [ 2drop f f ] if ; flushable -: nths ( indices seq -- seq' ) - [ swap nth ] with map ; +: nths ( seq indices -- seq' ) + swap [ nth ] curry map ; : replace ( str oldseq newseq -- str' ) zip >hashtable substitute ;