Created
November 22, 2020 07:18
-
-
Save PavelGnatyuk/b7ef439f9a8b35049db603e63f6c88e4 to your computer and use it in GitHub Desktop.
Monoid protocol in Swift
This file contains hidden or 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
protocol Monoid { | |
static var neutral: Self { get } | |
func operation(_ other: Self) -> Self | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment