Sha256: d6fc545ddf3401945e305fa1e479bede884a28be5b0ae223c7ef7e8df216f9a3
Contents?: true
Size: 698 Bytes
Versions: 1
Compression:
Stored size: 698 Bytes
Contents
class Integer { """ Base class for integer values in Fancy. """ def times: block { """ @block @Block@ to be called with each number between 0 and @self. @return @self Calls a given @Block@ with each number between 0 and @self. """ tmp = 0 while: { tmp < self } do: { block call: [tmp] tmp = tmp + 1 } self } def times: block offset: offset { """ @block @Block@ to be called with each number between @offset and @self. @offset Offset to be used as starting point of iteration. @return @self. Similar to #times: but starts at a given offset. """ self times: |i| { block call: [i + offset] } } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fancy-0.4.0 | lib/integer.fy |