
5 Mar
2015
5 Mar
'15
11:47 p.m.
silvio wrote:
cool trick. This is by far the best solution yet. Of course it's a bit deceptive in what you are working with. E.g.
bs1 <- pack [1..10] print bs1 let bs2 = map (+1) bs1 print bs2 let bs3 = map (+1) bs2 print bs3 ... let bsn = map (+1) bsn_1 print bsn
will have quadratic complexity.
One could perhaps replace id with unsafeCoerce in wrap? Cheers Ben