blob: 158ad179369acd7133f7ac70c6a5c941d714c3f6 (
plain) (
tree)
|
|
object Test {
def add2(x:Long,y:Long): Long = x + y
def add[Long](x: List[Long], y: List[Long]): List[Long] =
if (x.isEmpty || y.isEmpty) Nil
else add2(x.head, y.head) :: add(x.tail, y.tail)
}
|