I’m trying to capture a function like
f = &List.replace_at/3
but
f([1,2,3],0,4)
gives me
** (CompileError) iex: undefined function f/3
What is wrong?
I’m trying to capture a function like
f = &List.replace_at/3
but
f([1,2,3],0,4)
gives me
** (CompileError) iex: undefined function f/3
What is wrong?
In oder to invoke anonymous functions the syntax is f.([1,2,3],0,4)
. Note the additional .
.