[Haskell-cafe] Haskell-cafe] Preventing sharing

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Fri Jan 8 20:33:42 UTC 2016

On Fri, Jan 08, 2016 at 03:18:38PM -0500, Doug McIlroy wrote:
> Though ML was the best of the strict bunch. Haskell's overloading
> and cleaner notation made for more perspicuous code. It also
> enabled elegant code like this for the exponential series:
> 	exps = 1 + integral exps
> As Oleg pointed out, this won't work in a strict language, and
> must be replaced with something much less vivid:
> 	exps = fix (\s 1 + integral s)

Can you explain why the first line won't work for lazy lists in a strict
language?  It seems perfectly fine to me.


More information about the Haskell-Cafe mailing list