Select correct implementation of drop function, so that following expression is true.
drop(List(1, 2, 3), 1) == List(2,3)
Assuming the following code is available for your reference
sealed trait List[+A]
case object Nil extends List[Nothing]
case class Cons[+A](head: A, tail: List[A]) extends List[A]

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback