Re:Corecursion
by gamegoblin on Thursday May 08, 2014 @06:31PM
(#7718119)
Alternatively, making use of laziness and recursive definitions:
[ Parent
| on HN ]
Your version is certainly pretty, and it's based on an insight into the nature of the fibonacci series
But the value of co-recursion is that you don't need that insight. When you expand out the definitions of `tail`, `!!` and `zipWith`, your code turns out to be the same as mine[1], so I consider that a big win for co-recursion.
[1]: At least I think it does.