14
我想读的以下2个功能参数列表:如何阅读斯卡拉功能的链参数
1. def foo(action: => String => String) = "bar"
2. def foo(action: =>() => String => String) = "bar"
- 名为“foo”接收命名函数的函数“行动”哪个接收/返回?
- 一个名为“foo”的函数接收一个名为“action”的函数,该函数返回一个返回???的函数。
我的理解问题是,我不知道如何决定是否在这里处理函数或简单的值作为参数。 – recalcitrant 2011-12-28 23:43:49