1 USING: help.syntax help.markup kernel math classes classes.tuple
6 { $class-description "Product model values are computed by collecting the values from a sequence of underlying models into a new sequence. Product models are automatically updated when underlying models change. Product models are constructed by " { $link <product> } "."
8 "A product model whose children are all " { $link "models-range" } " conforms to the " { $link "range-model-protocol" } " and represents a point in n-dimensional space which is bounded by a rectangle." }
10 "The following code displays a pair of sliders, and an updating label showing their current values:"
12 "USING: models models.product models.range ui.gadgets"
13 "ui.gadgets.labels ui.gadgets.packs ui.gadgets.panes"
14 "ui.gadgets.sliders ;"
16 ": <funny-model> ( -- model ) 0 10 0 100 1 <range> ;"
17 ": <funny-slider> ( model -- slider ) horizontal <slider> ;"
19 "<funny-model> <funny-model> 2array"
20 "[ <pile> [ horizontal <slider> add-gadget ] reduce gadget. ]"
21 "[ <product> [ unparse ] <arrow> <label-control> gadget. ]"
27 { $values { "models" "a sequence of models" } { "product" "a new " { $link product } } }
28 { $description "Creates a new instance of " { $link product } ". The value of the new product model is obtained by mapping the " { $snippet "value" } " slot accessor over the given sequence of models." }
29 { $examples "See the example in the documentation for " { $link product } "." } ;
31 ARTICLE: "models.product" "Product models"
32 "Product model values are computed by collecting the values from a sequence of underlying models into a new sequence."
38 ABOUT: "models.product"