haskell - What is practical use of monoids? -
haskell - What is practical use of monoids? - i'm reading learn haskell , i've covered applicative , i'm on monoids. have no problem understanding both, although found applicative useful in practice , monoid isn't quite so. think don't understand haskell. first, speaking of applicative , creates uniform syntax perform various actions on 'containers'. can utilize normal functions perform actions on maybe , lists, io (should have said monads? don't know monads yet), functions: λ> :m + control.applicative λ> (+) <$> (just 10) <*> (just 13) 23 λ> (+) <$> [1..5] <*> [1..5] [2,3,4,5,6,3,4,5,6,7,4,5,6,7,8,5,6,7,8,9,6,7,8,9,10] λ> (++) <$> getline <*> getline 1 line , 1 "one line , one" λ> (+) <$> (* 7) <*> (+ 7) $ 10 87 so applicative abstraction. think can live without helps express ideas mode , that's fine. now, let's take @ monoid . abstraction , pretty simple ...