Realm v0.1.0 Realm.Monoid protocol View Source

Monoid extends the semigroup with the concept of an "empty" or "zero" element.

Type Class

An instance of Realm.Monoid must also implement Realm.Semigroup, and define Realm.Monoid.empty/1.

Semigroup  [append/2]
    
 Monoid    [empty/1]

Link to this section Summary

Functions

An "emptied out" or "starting position" of the passed data.

Link to this section Types

Link to this section Functions

Link to this function

empty(monoid)

View Source
empty(t()) :: t()

An "emptied out" or "starting position" of the passed data.

Example

iex> Realm.Monoid.empty(10)
0
iex> Realm.Monoid.empty [1, 2, 3, 4, 5]
[]