3 Jun
2004
3 Jun
'04
12:07 a.m.
I'm sorry I couldn't resist another example -- which requires fewer signatures. It also illustrates storing build in data structures. In the example below (which works with the code posted earlier) build is used to build itself. It really has quite a few faces... data W = W (forall r a. (BuildList a r) => (a->r)) test2 = let t1 = build (W build) t2 = build (W build) (W build) t3 = t1 ++ t2 f (W b) = b (1::Int) ++ b (1::Int) (2::Int) ++ b (1::Int) (2::Int) (3::Int) in map f t3 We should probably move to Cafe for further discussions, if any...