]> gitweb.factorcode.org Git - factor.git/commitdiff
De-linting lists and lists.lazy
authorJames Cash <james.nvc@gmail.com>
Thu, 5 Jun 2008 23:50:35 +0000 (19:50 -0400)
committerJames Cash <james.nvc@gmail.com>
Thu, 5 Jun 2008 23:50:35 +0000 (19:50 -0400)
extra/lists/lazy/lazy-docs.factor
extra/lists/lists.factor

index 95e925b08964b120f234623be250c8005c2b898d..6a9359027d72947ab908d536dff8a2e3c53739b3 100644 (file)
@@ -115,7 +115,7 @@ HELP: lmerge
 { $values { "list1" "a list" } { "list2" "a list" } { "result" "lazy list merging list1 and list2" } }
 { $description "Return the result of merging the two lists in a lazy manner." } 
 { $examples
-  { $example "USING: lazy-lists prettyprint ;" "{ 1 2 3 } >list { 4 5 6 } >list lmerge list>array ." "{ 1 4 2 5 3 6 }" }
+  { $example "USING: lists.lazy prettyprint ;" "{ 1 2 3 } >list { 4 5 6 } >list lmerge list>array ." "{ 1 4 2 5 3 6 }" }
 } ;
 
 HELP: lcontents
index 30a234214bda33431517c6fc66b3753f3da209f0..3799d48fff52965a86e125b19a506baf10693e97 100644 (file)
@@ -26,7 +26,7 @@ M: object nil? drop f ;
     
 : atom? ( obj -- ? ) [ list? ] [ nil? ] bi or not ;
 
-: nil ( -- +nil+ ) +nil+ ; 
+: nil ( -- symbol ) +nil+ ; 
     
 : uncons ( cons -- cdr car )
     [ cdr ] [ car ] bi ;
@@ -61,9 +61,9 @@ M: object nil? drop f ;
 : lmap ( list quot -- result )
     over nil? [ drop ] [ (leach) lmap cons ] if ; inline
 
-: foldl ( list ident quot -- result ) swapd leach ; inline
+: foldl ( list identity quot -- result ) swapd leach ; inline
 
-: foldr ( list ident quot -- result )
+: foldr ( list identity quot -- result )
     pick nil? [ [ drop ] [ ] [ drop ] tri* ] [
         [ [ cdr ] 2dip foldr ] [ nip [ car ] dip ] 3bi
         call