4 ms·
nitpick; that what you described is: (1 to: 5) do: [:x | Transcript show: x ] there is actually a to:do: method in the Number class, for example see the G
by ithkuil 10y ago
nitpick; that what you described is:
(1 to: 5) do: [:x | Transcript show: x ]
there is actually a to:do: method in the Number class, for example see the GNU smalltalk documentation:
https://www.gnu.org/software/smalltalk/manual-base/html_node/Number_002dshortcuts-and-iterators.html#Number_002dshortcuts-and-iterators https://www.gnu.org/software/smalltalk/manual-base/html_node...
- Chyzwar 10y agobut internally to:do: is implemented as from:to:by: and do: with is almost the same.