Can I write a function that returns the name of the function given as an argument?
let funName f: string =
For example, if I pass printfnfunName as an argument, it returns "printfn".
> funName printfn;;
val it : string = "printfn"
EDIT: I wanted to write a function docthat returns the XML documentation associated with this function.
let doc f =
To get a summary of the function using something like NuDoq , I wanted to know the name of the function.
source
share