【问题标题】:How to retrieve a function name in F#?如何在 F# 中检索函数名?
【发布时间】:2009-08-23 23:42:45
【问题描述】:

考虑代码示例:

let foo x = x

let bar f =
  printf "function name is %s" (*?*)

bar foo //should print: "function name is foo" 

非常感谢!

【问题讨论】:

    标签: f#


    【解决方案1】:

    你不能,对不起。 (具体取决于你想做什么,这里可能有一个限制,你可以削弱并​​完成工作。)

    还可以看看 Getting the name of the parameter passed into a method

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-12
      • 2015-06-18
      • 2011-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多