aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/collections.scala
blob: 107535ac5d8c5e63f55fe753b5db068b0902c9eb (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                       
import scala.collection.generic.CanBuildFrom

object collections {

  val nil = Nil
  val ints1 = 1 :: Nil
  val ints2 = 1 :: 2 :: Nil
  val ints3: List[Int] = ints2
  val f = (x: Int) => x + 1
    
  implicit def cb[B]: CanBuildFrom[List[B], B, List[B]]

  val ys = ints3 map ((x: Int) => x + 1)

}