Error when calling a method in Scala with a " " rather than a "." -



Error when calling a method in Scala with a " " rather than a "." -

why first pair of method calls (using mkstring) both work, while sec pair of method calls (using fold) fail when replace "." " "? parameter type missing?

i'm using scala version 2.11.0.

scala> list("a", "b", "c").mkstring("") res0: string = abc scala> list("a", "b", "c") mkstring("") res1: string = abc scala> list("a", "b", "c").fold(""){(x,y)=> x++y} res2: string = abc scala> list("a", "b", "c") fold(""){(x,y)=> x++y} <console>:8: error: missing parameter type list("a", "b", "c") fold(""){(x,y)=> x++y} ^ <console>:8: error: missing parameter type list("a", "b", "c") fold(""){(x,y)=> x++y}

scala

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -