News for hackers. Stuff that matters.
Re:Hello Ruby – Almost there by epidemian on Monday August 03, 2015 @02:24PM (#9998547)
> It's not a number's place to know how to do looping

If we consider a number as "zero or 1 plus a number", then the "Number" class could very well be the one that knows how to execute a piece of code a number times given that representation. It's actually pretty similar to the Church encoding of numbers in the lambda calculus[1].

[1]: https://en.wikipedia.org/wiki/Church_encoding

There are no comments on this comment yet.