]> gitweb.factorcode.org Git - factor.git/blob - basis/models/arrow/smart/smart-docs.factor
docs: change $subsection to $subsections
[factor.git] / basis / models / arrow / smart / smart-docs.factor
1 IN: models.arrow.smart
2 USING: help.syntax help.markup models.product ;
3
4 HELP: <smart-arrow>
5 { $values { "quot" { $quotation "( ... -- output )" } } }
6 { $description "A macro that expands into a form with the stack effect of the quotation. The form constructs a model which applies the quotation to values from an underlying " { $link product } " model having as many components as the quotation has inputs." }
7 { $examples
8   "A model which adds the values of two existing models:"
9   { $example
10     "USING: models models.arrow.smart accessors kernel math prettyprint ;"
11     "1 <model> 2 <model> [ + ] <smart-arrow>"
12     "[ activate-model ] [ value>> ] bi ."
13     "3"
14   }
15 } ;
16
17 ARTICLE: "models.arrow.smart" "Smart arrow models"
18 "The " { $vocab-link "models.arrow.smart" } " vocabulary generalizes arrows to arbitrary input arity. They're called “smart” because they resemble " { $link "combinators.smart" } "."
19 { $subsections <smart-arrow> } ;
20
21 ABOUT: "models.arrow.smart"