idiom for producing comma-seperated lists?
Fri, 8 Aug 2003 14:59:08 +0100 (BST)
On Fri, 8 Aug 2003, Antony Courtney wrote:
> I often need to format a list of strings using some character as a
> *seperator* rather than a terminator for the items. Is there some
> simple combinator or idiom from the Prelude or standard libraries that
> could be used for this purpose?
I think the primary intended use for `intersperse' from the List library
is to be used as in
mkSepStr = concat . intersperse ", "
www.cs.bris.ac.uk/~tweed/ | `It's no good going home to practise
email:email@example.com | a Special Outdoor Song which Has To Be
work tel:(0117) 954-5250 | Sung In The Snow' -- Winnie the Pooh