laziness of intersperse

Bart Massey bart at
Sat Aug 16 13:22:43 EDT 2008

A cleaner but still fully lazy version of intersperse might be

    intersperse sep (x1 : x2 : xs) =
        x1 : sep : intersperse sep (x2 : xs)
    intersperse _ l = l

(I'd quote to give some context, but gmane says I can't unless I artificially
pad the length of my new text.  Is there any way to post to this list other than

More information about the Libraries mailing list