@cgarciae: How about this code:
operations = [&Kernel.+(&1, 2), &Kernel.+(&1, 5), &Kernel.*(&1, 10)]
Enum.map(operations, &(&1.(2)))
# [4, 7, 20]
In your case it will look like:
assert [4, 7, 20] == [&add(&1, 2), &add(&1, 5), &mul(&1, 10)]
|> Enum.map(operations, &(&1.(2)))
# or
def my_map(value, operations), do: Enum.map(operations, &(&1.(value))
assert [4, 7, 20] ==
2
|> my_map([
&add(&1, 2),
&add(&1, 5),
&mul(&1, 10)
])


















