Realm v0.1.0 Realm.Semigroup.Algebra View Source

Link to this section Summary

Functions

Flatten a list of homogeneous semigroups to a single container.

Repeat the contents of a semigroup a certain number of times.

Link to this section Functions

Flatten a list of homogeneous semigroups to a single container.

Example

iex> import Realm.Semigroup.Algebra
...> concat [
...>   [1, 2, 3],
...>   [4, 5, 6]
...> ]
[1, 2, 3, 4, 5, 6]

Repeat the contents of a semigroup a certain number of times.

Examples

iex> import Realm.Semigroup.Algebra
...> [1, 2, 3] |> repeat(3)
[1, 2, 3, 1, 2, 3, 1, 2, 3]