
20 Aug
2001
20 Aug
'01
1:35 p.m.
Frank Atanassow wrote:
This is a situation where the explicit fixpoint datatype comes in handy:
data Fix f = In (f (Fix f))
...
BTW, this is not a beginner, or even intermediate, Haskell programmer's technique.
For those who are interested in what exactly is or isn't a beginner or intermediate Haskell programmer's technique, I humbly offer the following http://www.willamette.edu/~fruehr/haskell/evolution.html which includes examples of the afore-mentioned approach, along with many others, from accumulating parameters to comonads. Fair warning: tongue held firmly in cheek ... -- Fritz Ruehr fruehr@willamette.edu