
9 Nov
2006
9 Nov
'06
5:27 p.m.
Jon Fairbairn
Then there's the specific question of whether intercalate is actually a better abstraction than intersperse. "concat . intersperse" is hardly difficult to read,
I have found over the years, that pretty-much every time I write "intersperse" in a program, I get a type error. It almost always turns out that I really wanted "concat . intersperse", and so I write that instead. So perhaps this just demonstrates that I have the wrong idea about what intersperse is supposed to do. But the very fact that I keep making the same mistake suggests that there is indeed a natural and intuitive function hiding there, and I keep reaching for it, but with the wrong name. Regards, Malcolm