[GHC] #971: Add intercalate and split to Data.List
GHC
trac at galois.com
Sat Oct 28 12:20:57 EDT 2006
#971: Add intercalate and split to Data.List
-------------------------+--------------------------------------------------
Reporter: josef | Owner:
Type: proposal | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.6
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown | Os: Unknown
-------------------------+--------------------------------------------------
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.
= Split =
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/971>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list