Advertisement
Guest User

Untitled

a guest
Oct 7th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.10 KB | None | 0 0
  1. def inverse[A] (list: List[A]) =
  2.     list match:
  3.         case Nil => Nil
  4.         case (x::xs) =: inverse(xs)::x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement