Hacker News new | ask | show | jobs
by OJFord 3261 days ago
That paragraph confused me too, but then I realised what he meant, felt the same as you, but still couldn't think of anything on the spot that would work other than:

    set(value) {
        count = 0
        while count != value {
            increment()
        }
    }
(~~may not be~~ probably isn't valid Dart)
1 comments

That's an infinite recursion, because increment() is going to call back to set()
Heh, true. So, examples are hard. :)