Proposal: Make intersperse lazier

Christian Maeder Christian.Maeder at
Mon Sep 27 04:41:39 EDT 2010

Am 24.09.2010 19:50, schrieb Daniel Fischer:
> prependToAll s xs = s : intersperse s xs
> Those are of course a bit silly if intersperse is defined in terms of 
> prependToAll.
> But I don't see where one would need that function, so I'm hesitating to 
> propose changing the API of Data.List. If you have use cases, I would 
> probably support it.

You're right. Including prependToAll is unnecessary. After all we just
want to fix a space leak in intersperse (with or without lokal worker).

+1 for your proposal


More information about the Libraries mailing list