]> gitweb.factorcode.org Git - factor.git/commitdiff
lists: Add list literal doc example.
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 14 Jul 2018 03:58:18 +0000 (22:58 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 14 Jul 2018 03:58:57 +0000 (22:58 -0500)
basis/lists/lists-docs.factor

index 28cd82c639541721b8467493dd2ce737bbdd6ea0..67e36787f27214428be6224fb57437c2ffffd42f 100644 (file)
@@ -28,6 +28,7 @@ ARTICLE: "lists-protocol" "The list protocol"
 ARTICLE: "lists-strict" "Constructing strict lists"
 "Strict lists are simply cons cells where the car and cdr have already been evaluated. These are the lists of Lisp. To construct a strict list, the following words are provided:"
 { $subsections
+    \ L{
     cons
     swons
     sequence>list
@@ -62,6 +63,15 @@ ARTICLE: "lists-manipulation" "Manipulating lists"
     lcut
 } ;
 
+HELP: L{
+{ $syntax "L{ val1 val2... }" }
+{ $values { "val1" object } { "val2" object } }
+{ $example
+    "USING: lists prettyprint ; L{ 1 2 3 } ."
+    "L{ 1 2 3 }"
+}
+{ $description "Constructs a list literal from a sequence." } ;
+
 HELP: cons
 { $values { "car" "the head of the list cell" } { "cdr" "the tail of the list cell" } { "cons-state" list } }
 { $description "Constructs a cons cell." } ;