O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Monoids

In mathematics, Monoids can be considered as categories with a single object. They capture the idea of function composition within a set. In fact, all functions from a set into itself naturally form a Monoid with respect to function composition.

In computer science, there are different types of Monoid, such as free, transition, syntactic, trace, and history. A set of strings built from a given set of characters is a free Monoid. The transition Monoid and syntactic Monoid are used to describe finite state machines, whereas trace Monoids and history Monoids provide a foundation for process calculi and concurrent computing.

Simply put, in computer science, a Monoid is a set, a binary operation, and an element of the set with the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required