<div dir="ltr">F = fun(X,Y) -> X+Y end,<div><div><br></div><div style>In the above statement, F is just a function reference. Can I get the syntax, code tree or anything else from this variable? All I need is to extract the syntax out of a function reference. Any ideas how I can achieve this?</div>
</div><div style><br></div><div style>The following convert a fun string into an actual fun. I need something the other way round, any ideas ??</div><div style><br></div><div style><br></div><div>{ok,Tks,_} = erl_scan:string(FunString),</div>
<div>{ok,E} = erl_parse:parse_exprs(Tks),</div><div style>{value,Funs,_} = erl_eval:exprs(E,[]) </div><div style><br></div><div style>Thanks :)</div></div>