Elixir Blog Post: Dynamic Nested Function Call with Macro

Blogged on how to build a nested dynamic function call like

foo(:bar, fn arg1 ->
  foo(:baz, fn arg2 ->
    ...
      foo(:bzz, fn argN ->
        {arg1, arg2, ..., argN}
      end)
    ...
  end)
end)

when the nesting level is not known upfront. That might be helpful for dynamic generation of deeply bound StreamData with StreamData.bind/2.


Posted via Devtalk (see this thread for details).

2 Likes