
16 Jul
2007
16 Jul
'07
10:19 a.m.
Bryan Burgers wrote:
Uh, I know that's a very poor explanation, but hopefully it gives you an alternate way to look at the problem.
Yes, this was extremely helpful, thank you very much. The moments where one realizes that a large piece of clumsy code can be replaced with a simple high-level function application seem to be an integral part of learning Haskell. This time it was zipWith. Previously (for me) it has been the folds :) I know that in Haskell there almost always is a high-level solution to a recursive problem (the legendary "here's a one-line fold that replaces your entire program"), but sometimes it can be very difficult to see, especially if IO is involved. Niko