Created
March 20, 2020 01:57
-
-
Save JunsikChoi/5f86804bde417718e6e795bd718ce85c to your computer and use it in GitHub Desktop.
Definition of Monoid in Haskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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