Tips for golfing in Tcl What general tips do you have for golfing in Tcl? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Tcl (e.g. "remove comments" is not an answer). Please post one tip per answer.
Use lmap instead foreach. This requires Tcl 8.6.

The syntax is the same, but lmap returns a list with the result of each loop.