Recursive Anonymous Functions in Elixir: Combinators and Macros
github.com
github.com
Having said that, I've never ran into a case where I wanted to use an anonymous function recursively in Elixir. Come to think of it, I don't really use anonymous functions much at all, outside of Enum calls, which handle the recursion part for you anyway. What would be the use case?
On a side note, I think this article provided an outstanding tutorial for writing macros in Elixir. Since macros are how Elixir implements metaprogramming, knowing how to write them is a good thing. I typically use macros to write more expressive guard clauses, but you can do whatever you want with them. Chris McCord wrote an excellent book on macros, called Metaprogramming Elixir, if you want to know more about them.
One use case that comes to mind would be nested data structures where you'd like to iterate over each child's children.