Skip to content

Instantly share code, notes, and snippets.

@eMdOS
Created May 17, 2020 19:39
Show Gist options
  • Save eMdOS/25fe07dda12f9c5846111ac9a5f2e1c7 to your computer and use it in GitHub Desktop.
Save eMdOS/25fe07dda12f9c5846111ac9a5f2e1c7 to your computer and use it in GitHub Desktop.
public func concat<M: Monoid>(_ elements: [M]) -> M {
elements.reduce(.empty, <>)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment