Generic-ish monoid

Run Settings
LanguageElm
Language Version
Run Command
import Html exposing (..) type alias Monoid a = { mempty : a , mappend : a -> a -> a } listMonoid : Monoid (List a) listMonoid = { mempty = [] , mappend = (++) } type Sum = Sum Int sumMonoid : Monoid Sum sumMonoid = { mempty = Sum 0 , mappend = \(Sum a) (Sum b) -> Sum (a + b) } genericTrippleAppend : Monoid a -> a -> a -> a -> a genericTrippleAppend m a b c = m.mappend (m.mappend a b) c main = text "Hello World!"
Editor Settings
Theme
Key bindings
Full width
Lines