Skip to content

Instantly share code, notes, and snippets.

View JoeyEremondi's full-sized avatar

Joey Eremondi JoeyEremondi

View GitHub Profile
-- interface is a more familiar name for the intention of the construct
type alias Append a rest = { rest | append : a -> a -> a}
-- implement is a more familiar name
stringAppend rest = {rest | append = \x y -> x ++ y}
-- this is Monoid
type alias AppendWithId a rest = Append a {rest | id : a}
-- ^ 1 potential superclass