]> gitweb.factorcode.org Git - factor.git/commitdiff
docs for dlist-filter
authorJoe Groff <arcata@gmail.com>
Sun, 10 May 2009 01:15:03 +0000 (20:15 -0500)
committerJoe Groff <arcata@gmail.com>
Sun, 10 May 2009 01:15:03 +0000 (20:15 -0500)
basis/dlists/dlists-docs.factor

index 12e39746c7278f85b728f722ab9922e4d5fa5b43..e210ad35ced613e9bbea301958d5548596e8cbd6 100755 (executable)
@@ -15,6 +15,7 @@ $nl
 "Iterating over elements:"
 { $subsection dlist-each }
 { $subsection dlist-find }
+{ $subsection dlist-filter }
 { $subsection dlist-any? }
 "Deleting a node matching a predicate:"
 { $subsection delete-node-if* }
@@ -40,6 +41,11 @@ HELP: dlist-find
     "This operation is O(n)."
 } ;
 
+HELP: dlist-filter
+{ $values { "dlist" { $link dlist } } { "quot" quotation } { "dlist" { $link dlist } } }
+{ $description "Applies the quotation to each element of the " { $link dlist } " in turn, removing the corresponding nodes if the quotation returns " { $link f } "." }
+{ $side-effects { "dlist" } } ;
+
 HELP: dlist-any?
 { $values { "dlist" { $link dlist } } { "quot" quotation } { "?" "a boolean" } }
 { $description "Just like " { $link dlist-find } " except it doesn't return the object." }