Question: Consider the incomplete Scala code where some types have been replaced with numbered question marks. def sip (X,Y) ixtistix), ysList[91) List[ex,x) - 4 (x, yu)
Consider the incomplete Scala code where some types have been replaced with numbered question marks. def sip (X,Y) ixtistix), ysList[91) List[ex,x) - 4 (x, yu) match case (Nil,-) -> Nii case ( Nil) -> Nil case (x1+x. yy) -> (X,Y) 11 zip (x, ys) ) valu 71 - zip (List (1, 2, 3), xp (List (***. Y. "*"), Lint (4, 5, 6 Which type must replace ? 1 for this code to typecheck correctly? 21 = (List[Int], List[String). List[Int)) 21 = List[((Int, String), Int)] 21 = List[(Int, String, Int)] 21 = (List[Int], List[String]) 21 = List[(Int, (String, Int))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
