*claps sardonically* I was waiting for that response. You did it
with H::T, not
within H::T. Your node is an excellent example of twisting the problem to suit the answer. Not only is your template nearly unreadable the first 3 times one reads it, but your code is nearly impossible to follow as well. The point wasn't to see if you could code a solution that involves H::T. The point was to see if H::T could provide a solution.
And, yes, any recursive solution can be written iteratively. That doesn't mean that H::T can handle it any better.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?