Kirk Martinez wrote:
It seems there is a very close correspondence between data structures and functions in Haskell. Your powersOfTwo function, since it gets memoized automatically (is this the case for all functions of zero arguments?), seems exactly like a data structure. This harks back to my Scheme days when we learned about the close relationship between code and data.

You might also find Neil's blog post about CAFs interesting:

http://neilmitchell.blogspot.com/2009/02/monomorphism-and-defaulting.html

Fijne avond,

Martijn.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to