Recursive anonymous functions

What’s the state of recursive anonymous functions now? It was mentioned a while ago, when this feature was being introduced in OTP 17. What’s the syntax for defining those? This isn’t working:

f = fn                      
  (0, acc) -> acc             
  (num, acc) -> f.(num-1, acc+1)
end
1 Like