小编Nik*_*mar的帖子

为什么Haskell优先级只有10个级别?10的数字够了吗?

我想知道为什么Haskell设计师同意只允许10个级别的优先级?有人发现它不够吗?

haskell operator-precedence

11
推荐指数
2
解决办法
823
查看次数

如何在scala中创建curried匿名函数?

如何在Scala中创建匿名和curried功能?以下两个失败:

scala> (x:Int)(y:Int) => x*y
<console>:1: error: not a legal formal parameter
       (x:Int)(y:Int) => x*y
              ^

scala> ((x:Int)(y:Int)) => x*y
<console>:1: error: not a legal formal parameter
       ((x:Int)(y:Int)) => x*y
               ^
Run Code Online (Sandbox Code Playgroud)

scala anonymous-function currying

10
推荐指数
1
解决办法
2282
查看次数