
1 Jan
2011
1 Jan
'11
8:42 p.m.
Will Ness
... they *both* turn out to be *completely* and utterly *wrong* :) in a general case (although probably for different reasons).
Sorry, my bad. Thought in terms of "merge", but the definiton used in VIP code was really an "union". When definition was changed to a real "merge", non-removing of duplicates, everything was as expected in that case, for both versions.
*Main> take 20 $ hfold [concatMap (replicate 3) [n,n+1..]|n<-[1..]] *Main> take 20 $ tfold [concatMap (replicate 3) [n,n+1..]|n<-[1..]]
[1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4]