Closed strokyl closed 2 years ago
Before val a::Nil = List(1) was rewritten to val List.empty::Nil = List(1)
val a::Nil = List(1)
val List.empty::Nil = List(1)
case Nil|Nil => was rewritten to case List.empty|List.empty
case Nil|Nil =>
case List.empty|List.empty
and case (a, List(Nil)) => was rewritten to case (a, List(List.empty))
case (a, List(Nil)) =>
case (a, List(List.empty))
Awesome, thanks!
Before
val a::Nil = List(1)
was rewritten toval List.empty::Nil = List(1)
case Nil|Nil =>
was rewritten tocase List.empty|List.empty
and
case (a, List(Nil)) =>
was rewritten tocase (a, List(List.empty))