De-linting lists and lists.lazy

db4
James Cash 2008-06-05 19:50:35 -04:00
parent 50b76dbe26
commit 887b385250
2 changed files with 4 additions and 4 deletions

View 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

View 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