Comment

Comment by vbit

This applies to loops as well. Numbers are objects that accept the `timesRepeat:` message:

    10 timesRepeat: [ n := n*2 ].
Not only that, you can send messages to blocks, to implement loops.

    [ n < 10 ] whileTrue: [ n := n + 1 ]
parent vbit 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton