View Source Ext.Enum (ext v1.4.0)

Ext.Enum provides helper functions related to Enum.

Summary

Functions

Returns a list by invoking the mapper function the given number of times.

Functions

repeat(count, mapper)

@spec repeat(number(), (number() -> element)) :: [element] when element: var

Returns a list by invoking the mapper function the given number of times.

Examples

iex> Ext.Enum.repeat(3, &(&1 + 5))
[5, 6, 7]