Add intercalate to Data.List
|Reported by:||josef||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
Add a function equal to
concat (intersperse x xs)
The initial mail for this proposal and the following discussion can be found here: http://www.haskell.org/pipermail/libraries/2006-October/005917.html
A summary of the discussion:
Accepting the patch
A lot of people agreed that including a function such as intercalate in the libraries would be a good thing. Indeed, many said they already had such a function in their own libraries. Jon Fairbairn argued against giving a name to such a short idiom and this was supported by Ketil Malde.
The submitter interpreted this as a clear majority in favour of this patch.
The name 'intercalate'
The original proposal for the name was join. Since it clashes with Control.Monad.join it was deemed inappropriate. Many other names were suggested: separateWith, sepBy, joinWith, concatIntersperse, consperse, intercat, connect, concatInter and intercalate. The original submitter decided for 'intercalate'. A number people said they agreed with this. One person said he preferred joinWith but others argued against that. Some people expressed their concerns against such an uncommon word being used and suggested that there should be some explanation for it. It was agreed that there should be an explanation somewhere on the Wiki.
Bulat Ziganshin suggested also adding a function split which is a right inverse of intercalate. Donald Steward seemed to agree with this decision. No one else raised their voice about this so it seems uncontroversial.
Change History (8)
comment:2 Changed 10 years ago by
|Summary:||Add intercalate and split to Data.List → Add intercalate to Data.List|