Skip to content

Instantly share code, notes, and snippets.

@JunsikChoi
Created March 20, 2020 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JunsikChoi/5f86804bde417718e6e795bd718ce85c to your computer and use it in GitHub Desktop.
Save JunsikChoi/5f86804bde417718e6e795bd718ce85c to your computer and use it in GitHub Desktop.
Definition of Monoid in Haskell
class Semigroup a => Monoid a where
mempty :: m -- 항등원
mappend :: m -> m -> m -- 이항연산
mconcat :: [m] -> m
mconcat :: foldr mappend mempty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment