Proposal: Make intersperse lazier

Stephen Tetley stephen.tetley at
Fri Sep 17 07:01:16 EDT 2010

On 17 September 2010 09:48, Christian Maeder <Christian.Maeder at> wrote:

> I support this proposal, because it is be more efficient.
> However, the (unfortunately so common) use of the auxiliary function
> "go" does not look nice to me. It looks less abstract (or declarative)
> just for efficiency reasons.

Hi Christian

go here, and the top-level intersperse are both in the so-called
"declaration style".

The algorithm has one case for the first element (no prepend - take
one) then another case for the all the rest (prepend with sep - take
one - recurse). So the implementation is a literal (and concise)
implementation of the algorithm - is this not declarative?

Best wishes


More information about the Libraries mailing list