By making the call bar_fn.(c), my code is implicitly asserting that bar_fn is an anonymous function. If bar_fn had been passed in as a parameter, checking its arity would require something like Dialyzer.
However, in this case, bar_fn is being defined in the current function. So, all of the needed information should be available to perform type inference (or whatever). I’m not saying it would be easy (I really don’t know), but it seems like it should be possible.


















