Use &Module.function/arity to pass it, and .(…) to call it.
For example:
def my_hof(f)
f.([1, 2, 3], &(&1 * 2))
end
my_hof(&Enum.map/2)
Use &Module.function/arity to pass it, and .(…) to call it.
For example:
def my_hof(f)
f.([1, 2, 3], &(&1 * 2))
end
my_hof(&Enum.map/2)