How to get a name of a variable coming into a function as a parameter using F#?

Posted by Oldrich Svec on Stack Overflow See other posts from Stack Overflow or by Oldrich Svec
Published on 2010-04-29T09:37:19Z Indexed on 2010/04/29 11:27 UTC
Read the original article Hit count: 237

Filed under:
|
|

Is there any way in F# how to get a name of a variable passed into a function?

Example:

let velocity = 5
let fn v = v.ParentName
let name = fn velocity // this would return "velocity" as a string

Thank you in advance

© Stack Overflow or respective owner

Related posts about F#

Related posts about function