I wonder, is using the Y-combinator cheating? I would actually suggest that it might be the ‘nicest’ solution, because it sort of does ‘meta’-recursion; calling a function with itself as argument, so the function can recurse if and when it wants to, without using explicit recursion. (For instance, this will even work when using anonymous functions).


















