Joins text items together by separating these with commas, and "and" at the end.
We can combine elements with:
ghci> comma ["red", "green", "blue"]
"red, green, and blue"
The package has tooling for the two different comma styles, and can work with any string-like type.
The package can work with types that are an instance of IsString
and Monoid
. So this means it works with String
, Text
, ByteString
, MarkupM
, and probably a lot more types that concatenate with the Monoid
instance, and are an instance of IsString
.
The module is compiled with Safe
and does not depend on unsafe modules.
You can contribute by making a pull request on the GitHub repository.
You can contact the package maintainer by sending a mail to hapytexeu+gh@gmail.com
.