Skip to content

Instantly share code, notes, and snippets.

@tonymorris
Created March 26, 2014 12:09
Show Gist options
  • Save tonymorris/9781761 to your computer and use it in GitHub Desktop.
Save tonymorris/9781761 to your computer and use it in GitHub Desktop.
class Semigroup a where
(<>) ::
a
-> a
-> a
newtype T a =
T ([a] -> a)
instance Semigroup (T a) where
T f <> T g =
T (\as -> g (f as:as))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment