Meaning of Element methods

46 views
Skip to first unread message

Samuele Pretini

unread,
Mar 30, 2016, 10:04:52 AM3/30/16
to scala-language
Hi at all,

I'm new student of Scala.

During some test that I'm doing, I have seen the class scala.collection.IndexedSeqLike.Elements

In this class there is a method: aggregate

The signature of the method is the question: 
def aggregate[B](z: ⇒ B)(seqop: (BA) ⇒ Bcombop: (BB) ⇒ B)B

  1. What's mean of  z: => B ?
  2. What's mean of the 2 parenthesis: (z: ⇒ B)(seqop: (BA) ⇒ Bcombop: (BB) ⇒ B)
Can someone of us to explain to me?

Thanks a lot. :-)

som-snytt

unread,
Mar 30, 2016, 7:47:20 PM3/30/16
to scala-language

You'll find satisfying answers on http://stackoverflow.com/questions/tagged/scala or possibly quicker answers on https://gitter.im/scala/scala or the scala-user group.

The key phrases are by-name parameter and currying.
Reply all
Reply to author
Forward
0 new messages