squareBrackets method rx Regex with form for name in iter args call me

1
2
3
4
5
6
7
8
9
squareBrackets := method(
rx := Regex with("(?<form>.+) for (?<name>.+) in (?<iter>.+)");
args := call message arguments at(0) code matchesOfRegex(rx) next;
form := Message fromString(args at("form"));
name := args at("name");
iter := doString(args at("iter"));
helper := Object clone;
iter map(elem, helper setSlot(name, elem); (form doInContext(helper)))
)