
16 Jun
2008
16 Jun
'08
3:46 p.m.
David Roundy wrote:
A better question would be to think about what you are trying to accomplish, and then ask how to achieve that through functional programming.
Amen! I was waiting for somebody to say that... There are a dozen situations in an imperative language where you'd write a loop. But in Haskell, you might well do something entirely different for each situation. So it really pays to focus on what the end result you're after is, rather than how to translate imperative code line-for-line into Haskell.