Smalltalk っぽく書いてみた。

元ネタはこっち[squeak.qp.land.to]。

# test-readstream.st

| in s |

in  <- "0123456789 absdefg".
s   <- ReadStream on: in from: 0 to: in size.

s next.
        # => '0'