]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/fry/fry-docs.factor
Move make to its own vocabulary, remove fry _ feature
[factor.git] / basis / fry / fry-docs.factor
index 05cde62c1fa6771851b995c4f9f8d463637af384..4f33a6892a30be49276ad3bb657d9d6bf183b86e 100755 (executable)
@@ -7,9 +7,6 @@ HELP: ,
 HELP: @\r
 { $description "Fry specifier. Splices a quotation into the fried quotation." } ;\r
 \r
-HELP: _\r
-{ $description "Fry specifier. Shifts all fry specifiers to the left down by one stack position." } ;\r
-\r
 HELP: fry\r
 { $values { "quot" quotation } { "quot'" quotation } }\r
 { $description "Outputs a quotation that when called, fries " { $snippet "quot" } " by taking values from the stack and substituting them in." }\r
@@ -52,25 +49,11 @@ $nl
     "{ 8 13 14 27 } [ even? ] 5 [ dup ] swap [ ? ] curry 3compose map"\r
     "{ 8 13 14 27 } [ even? dup 5 ? ] map"\r
 }\r
-"Occurrences of " { $link _ } " have the effect of enclosing all code to their left in a quotation passed to " { $link dip } ". The following four lines are equivalent:"\r
-{ $code \r
-    "{ 10 20 30 } 1 '[ , _ / ] map"\r
-    "{ 10 20 30 } 1 [ [ ] curry dip / ] curry map"\r
-    "{ 10 20 30 } 1 [ swap / ] curry map"\r
-    "{ 10 20 30 } [ 1 swap / ] map"\r
-}\r
-"For any quotation body " { $snippet "X" } ", the following two are equivalent:"\r
-{ $code\r
-    "[ [ X ] dip ]"\r
-    "'[ X _ ]"\r
-}\r
 "Here are some built-in combinators rewritten in terms of fried quotations:"\r
 { $table\r
     { { $link literalize } { $snippet ": literalize '[ , ] ;" } }\r
     { { $link slip } { $snippet ": slip '[ @ , ] call ;" } }\r
-    { { $link dip } { $snippet ": dip '[ @ _ ] call ;" } }\r
     { { $link curry } { $snippet ": curry '[ , @ ] ;" } }\r
-    { { $link with } { $snippet ": with swapd '[ , _ @ ] ;" } }\r
     { { $link compose } { $snippet ": compose '[ @ @ ] ;" } }\r
     { { $link bi@ } { $snippet ": bi@ tuck '[ , @ , @ ] call ;" } }\r
 } ;\r
@@ -85,11 +68,6 @@ ARTICLE: "fry.philosophy" "Fried quotation philosophy"
 { $code\r
     "'[ 3 , + 4 , / ]"\r
     "[let | a [ ] b [ ] | [ 3 a + 4 b / ] ]"\r
-}\r
-"The " { $link _ } " fry specifier has no direct analogue in " { $vocab-link "locals" } ", however closure conversion together with the " { $link dip } " combinator achieve the same effect:"\r
-{ $code\r
-    "'[ , 2 + , * _ / ]"\r
-    "[let | a [ ] b [ ] | [ [ a 2 + b * ] dip / ] ]"\r
 } ;\r
 \r
 ARTICLE: "fry.limitations" "Fried quotation limitations"\r
@@ -103,7 +81,6 @@ $nl
 "Fried quotations contain zero or more " { $emphasis "fry specifiers" } ":"\r
 { $subsection , }\r
 { $subsection @ }\r
-{ $subsection _ }\r
 "When a fried quotation is being evaluated, values are consumed from the stack and spliced into the quotation from right to left."\r
 { $subsection "fry.examples" }\r
 { $subsection "fry.philosophy" }\r