What is the meaning of the Haskell operator "<>"? -


in haskell, meaning of <> operator (as distinct <*> or <$>). seeing references while researching the optparse-applicative package. neither google nor lyah seem have information.

it's alias mappend, data.monoid module.

(<>) :: monoid m => m -> m -> m (<>) = mappend 

mappend smashes 2 monoidal values together. example, using list monoid,

ghci> [1,2,3] <> [4,5,6] [1,2,3,4,5,6] 

when see function don't recognise, can find on api search engines hoogle or hayoo.


Comments