From 887b385250b31b3af7b2f6a7e703759b1aaef3ee Mon Sep 17 00:00:00 2001 From: James Cash Date: Thu, 5 Jun 2008 19:50:35 -0400 Subject: [PATCH] De-linting lists and lists.lazy --- extra/lists/lazy/lazy-docs.factor | 2 +- extra/lists/lists.factor | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extra/lists/lazy/lazy-docs.factor b/extra/lists/lazy/lazy-docs.factor index 95e925b089..6a9359027d 100644 --- a/extra/lists/lazy/lazy-docs.factor +++ b/extra/lists/lazy/lazy-docs.factor @@ -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 diff --git a/extra/lists/lists.factor b/extra/lists/lists.factor index 30a234214b..3799d48fff 100644 --- a/extra/lists/lists.factor +++ b/extra/lists/lists.factor @@ -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