I am trying to collect and use a function’s name and argument/parameter names.
For functions defined with a
def I can successfully match on these AST elements:
Function(params, _) Block(_,Function(params,Apply(func,_)))
However when I define something like:
val h: Int => Double = (a:Int) => (2*a).toDouble
and try and analyze
h, I can only match on:
So my question is: is their a way for me to access the definition of the function
h above? More concretely how can I know that
h has the parameter
a of type Int.