Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> collection.mutable.Buffer[Tuple2[Int, Int]]() += (1, 2)
- <console>:8: error: type mismatch;
- found : Int(1)
- required: (Int, Int)
- collection.mutable.Buffer[Tuple2[Int, Int]]() += (1, 2)
- ^
- scala> collection.mutable.Buffer[Tuple2[Int, Int]]() += ((1, 2))
- res2: scala.collection.mutable.Buffer[(Int, Int)] = ArrayBuffer((1,2))
- scala> Seq[Tuple2[Int, Int]]() :+ (1, 2)
- res3: Seq[(Int, Int)] = List((1,2))
Add Comment
Please, Sign In to add comment