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
Link to this function
concat(semigroups)
View Sourceconcat(Realm.Semigroup.t()) :: [Realm.Semigroup.t()]
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]
Link to this function
repeat(subject, n)
View Sourcerepeat(Realm.Semigroup.t(), non_neg_integer()) :: Realm.Semigroup.t()
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]