mconcat?
Closed this issue · 3 comments
hdgarrood commented
Do you think this library should include a function mconcat :: Monoid a => [a] -> a, like Haskell's? I'd be happy to put a pull request together if so.
garyb commented
We do have mconcat, just it's defined more generically in foldable-traversable instead: https://github.com/purescript/purescript-foldable-traversable/blob/master/src/Data/Foldable.purs#L70-L71
hdgarrood commented
ah, awesome, thanks :)
wereHamster commented
The function is called fold, here a stable link to the source: https://github.com/purescript/purescript-foldable-traversable/blob/363af1ede2e9b3a2ef956adb8ea5176ac24c0c79/src/Data/Foldable.purs#L171-L173