Skip to content

Instantly share code, notes, and snippets.

@PavelGnatyuk
Created November 22, 2020 07:18
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 PavelGnatyuk/b7ef439f9a8b35049db603e63f6c88e4 to your computer and use it in GitHub Desktop.
Save PavelGnatyuk/b7ef439f9a8b35049db603e63f6c88e4 to your computer and use it in GitHub Desktop.
Monoid protocol in Swift
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