Skip to content

compose_list and fix Elixir 1.4 warnings

Compare
Choose a tag to compare
@expede expede released this 27 Jun 06:11

Compose functions, from the head of the list of functions. The is the reverse
order versus what one would normally expect (left-to-right rather than
right-to-left).

Examples

  iex> sum_plus_one = compose_list([&(&1 + 1), &Enum.sum/1])
  ...> sum_plus_one.([1, 2, 3])
  7