From e4b88c61f396d40d793e638860070429eb8baacc Mon Sep 17 00:00:00 2001 From: James Cash Date: Tue, 3 Jun 2008 04:04:20 -0400 Subject: [PATCH] Moving extra/lazy-lists to extra/lists/lazy --- extra/{lazy-lists => lists/lazy}/authors.txt | 0 .../lazy}/examples/authors.txt | 0 .../lazy}/examples/examples-tests.factor | 0 .../lazy}/examples/examples.factor | 0 .../lazy/lazy-docs.factor} | 42 +---------------- .../lazy/lazy-tests.factor} | 4 +- .../lazy/lazy.factor} | 2 +- extra/{lazy-lists => lists/lazy}/old-doc.html | 0 extra/{lazy-lists => lists/lazy}/summary.txt | 0 extra/{lazy-lists => lists/lazy}/tags.txt | 0 extra/lists/lists-docs.factor | 45 +++++++++++++++++++ 11 files changed, 49 insertions(+), 44 deletions(-) rename extra/{lazy-lists => lists/lazy}/authors.txt (100%) rename extra/{lazy-lists => lists/lazy}/examples/authors.txt (100%) rename extra/{lazy-lists => lists/lazy}/examples/examples-tests.factor (100%) rename extra/{lazy-lists => lists/lazy}/examples/examples.factor (100%) rename extra/{lazy-lists/lazy-lists-docs.factor => lists/lazy/lazy-docs.factor} (88%) rename extra/{lazy-lists/lazy-lists-tests.factor => lists/lazy/lazy-tests.factor} (90%) rename extra/{lazy-lists/lazy-lists.factor => lists/lazy/lazy.factor} (99%) rename extra/{lazy-lists => lists/lazy}/old-doc.html (100%) rename extra/{lazy-lists => lists/lazy}/summary.txt (100%) rename extra/{lazy-lists => lists/lazy}/tags.txt (100%) diff --git a/extra/lazy-lists/authors.txt b/extra/lists/lazy/authors.txt similarity index 100% rename from extra/lazy-lists/authors.txt rename to extra/lists/lazy/authors.txt diff --git a/extra/lazy-lists/examples/authors.txt b/extra/lists/lazy/examples/authors.txt similarity index 100% rename from extra/lazy-lists/examples/authors.txt rename to extra/lists/lazy/examples/authors.txt diff --git a/extra/lazy-lists/examples/examples-tests.factor b/extra/lists/lazy/examples/examples-tests.factor similarity index 100% rename from extra/lazy-lists/examples/examples-tests.factor rename to extra/lists/lazy/examples/examples-tests.factor diff --git a/extra/lazy-lists/examples/examples.factor b/extra/lists/lazy/examples/examples.factor similarity index 100% rename from extra/lazy-lists/examples/examples.factor rename to extra/lists/lazy/examples/examples.factor diff --git a/extra/lazy-lists/lazy-lists-docs.factor b/extra/lists/lazy/lazy-docs.factor similarity index 88% rename from extra/lazy-lists/lazy-lists-docs.factor rename to extra/lists/lazy/lazy-docs.factor index fb87bee10f..1de98971f6 100644 --- a/extra/lazy-lists/lazy-lists-docs.factor +++ b/extra/lists/lazy/lazy-docs.factor @@ -2,47 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: help.markup help.syntax sequences strings lists ; -IN: lazy-lists - -{ car cons cdr nil nil? list? uncons } related-words - -HELP: cons -{ $values { "car" "the head of the lazy list" } { "cdr" "the tail of the lazy list" } { "cons" "a cons object" } } -{ $description "Constructs a cons cell." } ; - -HELP: car -{ $values { "cons" "a cons object" } { "car" "the first item in the list" } } -{ $description "Returns the first item in the list." } ; - -HELP: cdr -{ $values { "cons" "a cons object" } { "cdr" "a cons object" } } -{ $description "Returns the tail of the list." } ; - -HELP: nil -{ $values { "cons" "An empty cons" } } -{ $description "Returns a representation of an empty list" } ; - -HELP: nil? -{ $values { "cons" "a cons object" } { "?" "a boolean" } } -{ $description "Return true if the cons object is the nil cons." } ; - -HELP: list? ( object -- ? ) -{ $values { "object" "an object" } { "?" "a boolean" } } -{ $description "Returns true if the object conforms to the list protocol." } ; - -{ 1list 2list 3list } related-words - -HELP: 1list -{ $values { "obj" "an object" } { "cons" "a cons object" } } -{ $description "Create a list with 1 element." } ; - -HELP: 2list -{ $values { "a" "an object" } { "b" "an object" } { "cons" "a cons object" } } -{ $description "Create a list with 2 elements." } ; - -HELP: 3list -{ $values { "a" "an object" } { "b" "an object" } { "c" "an object" } { "cons" "a cons object" } } -{ $description "Create a list with 3 elements." } ; +IN: lists.lazy HELP: lazy-cons { $values { "car" "a quotation with stack effect ( -- X )" } { "cdr" "a quotation with stack effect ( -- cons )" } { "promise" "the resulting cons object" } } diff --git a/extra/lazy-lists/lazy-lists-tests.factor b/extra/lists/lazy/lazy-tests.factor similarity index 90% rename from extra/lazy-lists/lazy-lists-tests.factor rename to extra/lists/lazy/lazy-tests.factor index 7dd0c0f009..f4bb7b595b 100644 --- a/extra/lazy-lists/lazy-lists-tests.factor +++ b/extra/lists/lazy/lazy-tests.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2006 Matthew Willis and Chris Double. ! See http://factorcode.org/license.txt for BSD license. ! -USING: lists lazy-lists tools.test kernel math io sequences ; -IN: lazy-lists.tests +USING: lists lists.lazy tools.test kernel math io sequences ; +IN: lists.lazy.tests [ { 1 2 3 4 } ] [ { 1 2 3 4 } >list list>array diff --git a/extra/lazy-lists/lazy-lists.factor b/extra/lists/lazy/lazy.factor similarity index 99% rename from extra/lazy-lists/lazy-lists.factor rename to extra/lists/lazy/lazy.factor index 8b3d069c40..f8b1a6e6ef 100644 --- a/extra/lazy-lists/lazy-lists.factor +++ b/extra/lists/lazy/lazy.factor @@ -7,7 +7,7 @@ ! USING: kernel sequences math vectors arrays namespaces quotations promises combinators io lists accessors ; -IN: lazy-lists +IN: lists.lazy M: promise car ( promise -- car ) force car ; diff --git a/extra/lazy-lists/old-doc.html b/extra/lists/lazy/old-doc.html similarity index 100% rename from extra/lazy-lists/old-doc.html rename to extra/lists/lazy/old-doc.html diff --git a/extra/lazy-lists/summary.txt b/extra/lists/lazy/summary.txt similarity index 100% rename from extra/lazy-lists/summary.txt rename to extra/lists/lazy/summary.txt diff --git a/extra/lazy-lists/tags.txt b/extra/lists/lazy/tags.txt similarity index 100% rename from extra/lazy-lists/tags.txt rename to extra/lists/lazy/tags.txt diff --git a/extra/lists/lists-docs.factor b/extra/lists/lists-docs.factor index e69de29bb2..94407765fc 100644 --- a/extra/lists/lists-docs.factor +++ b/extra/lists/lists-docs.factor @@ -0,0 +1,45 @@ +! Copyright (C) 2006 Chris Double. +! See http://factorcode.org/license.txt for BSD license. + +IN: lists +USING: help.markup help.syntax ; + +{ car cons cdr nil nil? list? uncons } related-words + +HELP: cons +{ $values { "car" "the head of the lazy list" } { "cdr" "the tail of the lazy list" } { "cons" "a cons object" } } +{ $description "Constructs a cons cell." } ; + +HELP: car +{ $values { "cons" "a cons object" } { "car" "the first item in the list" } } +{ $description "Returns the first item in the list." } ; + +HELP: cdr +{ $values { "cons" "a cons object" } { "cdr" "a cons object" } } +{ $description "Returns the tail of the list." } ; + +HELP: nil +{ $values { "cons" "An empty cons" } } +{ $description "Returns a representation of an empty list" } ; + +HELP: nil? +{ $values { "cons" "a cons object" } { "?" "a boolean" } } +{ $description "Return true if the cons object is the nil cons." } ; + +HELP: list? ( object -- ? ) +{ $values { "object" "an object" } { "?" "a boolean" } } +{ $description "Returns true if the object conforms to the list protocol." } ; + +{ 1list 2list 3list } related-words + +HELP: 1list +{ $values { "obj" "an object" } { "cons" "a cons object" } } +{ $description "Create a list with 1 element." } ; + +HELP: 2list +{ $values { "a" "an object" } { "b" "an object" } { "cons" "a cons object" } } +{ $description "Create a list with 2 elements." } ; + +HELP: 3list +{ $values { "a" "an object" } { "b" "an object" } { "c" "an object" } { "cons" "a cons object" } } +{ $description "Create a list with 3 elements." } ; \ No newline at end of file