]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing cons>seq in extra/lists
authorJames Cash <james.nvc@gmail.com>
Sun, 22 Jun 2008 20:48:00 +0000 (16:48 -0400)
committerJames Cash <james.nvc@gmail.com>
Sun, 24 Aug 2008 03:13:26 +0000 (23:13 -0400)
extra/lists/lists.factor

index 613d75c4aee98812300e591925cafe72ccdc6059..881d2c39b8fea2ebe4bb951e5218bf3a8a77c477 100644 (file)
@@ -98,7 +98,7 @@ M: object nil? drop f ;
     [ lmap>array ] dip like ;
     
 : cons>seq ( cons -- array )    
-    [ dup cons? [ cons>seq ] when ] lmap>array ;
+    [ dup cons? [ cons>seq ] when dup nil? [ drop { } ] when ] lmap>array ;
     
 : list>seq ( list -- array )    
     [ ] lmap>array ;