I was wondering if I define an anonymous function in a module would I be able to access it from outside of the module? As an example consider the following code:
defmodule Lambda do
lambda = &(&1 * 3)
end
temp = Lambda.lambda.(10)
when I run this, I’ll get the following error:
** (UndefinedFunctionError) function Lambda.lambda/0 is undefined or private
Lambda.lambda()
Am I missing something or it’s because lambda.() is private?