Work In Progress

Work on this post is underway... It will be done "soon..."


  • Every monoid is a semiGroup but not the other way around. It has all characteristics of a semigroup + more
  • Laws:
    • Left Identity append(a, 0) == a
    • Right Identity append(0, a) == a
  • NotEmpty is not a monoid since it has no zero value.
  • Permission systems should be implemented as monoidal systems.
trait Monoid[A] extends SemiGroup[A] {
  def zero: A // example: Zero value for a string is ""
  // Note that we have inherited append from SemiGroup
}

Resources

  1. Functional Scala by John A. De Goes (Toronto Edition)
  2. Scalaz Monoid