Add intercalate to Data.List
|Reported by:||josef||Owned by:|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Revisions:|
Add a function equal to concat (intersperse x xs)
The initial mail for this proposal and the following discussion can be found here:
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:1 Changed 8 years ago by ross
- Cc libraries@… added
- Component changed from Compiler to libraries/base
comment:2 Changed 8 years ago by josef
- Summary changed from Add intercalate and split to Data.List to Add intercalate to Data.List