我是Scala的新手,我正在ScalaSTM上做一些閱讀。爲什麼在這個Scala方法定義中有兩組參數/圓括號?
,如果有人可以簡單地指明下面的概念,我將不勝感激,從而存在被傳遞到
def transfer(amount: Int, a: Ref[Int], b: Ref[Int])(c: Transaction) {
a.:=(a.get(c) - amount)(c)
b.:=(b.get(c) + amount)(c)
}
正在內c: Transaction
採用什麼概念的方法:2組括號?
一旦我知道我在找什麼,我會進一步閱讀!
感謝
http://stackoverflow.com/questions/4915027/two-ways-of-currying-in-scala-whats-the-use-case-for-each/4916606 #4916606 – 2012-11-25 04:37:40
提示:將鼠標懸停在「Scala標籤」上並點擊[「info」鏈接](http://stackoverflow.com/tags/scala/info)。這裏的術語是「多參數列表」。 – 2012-11-25 04:37:57
[Scala的兩種方式可能重複;什麼是每個用例?](http://stackoverflow.com/questions/4915027/two-ways-of-currying-in-scala-whats-the-use-case-for-each) – DJ180