1 ! Copyright (C) 2015 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax quotations strings ;
7 { $description "Syntax word for applying a quotation to a tuple slot." }
11 "USING: prettyprint changer kernel math ;"
13 "TUPLE: nightclub count ;"
14 "T{ nightclub f 0 } [ 3 + ] change: count ."
15 "T{ nightclub { count 3 } }"
24 { $description "A macro that takes a slot name and applies the quotation to a slot of a tuple." } ;
26 ARTICLE: "changer" "Changer syntax"
27 "The " { $vocab-link "changer" } " vocabulary defines one word to change the values of a slot of tuple objects."
29 "Syntax word to change tuple slots:"
33 "Macro to implement " { $link POSTPONE: change: } ":"