Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lazy vs non-lazy functions

17 views
Skip to first unread message

duke

unread,
May 20, 2012, 10:14:00 AM5/20/12
to
I've read that in Haskell, it is common practice to append an apostrophe to a function name to show that the function is non-lazy. E.g. :
doubleSmallNumber' x = (if x > 100 then x else x*2) + 1

I'm not groking the difference between lazy and non-lazy. What would be the lazy equivalent to the above function? TIA ...
0 new messages