Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def decode[T](list: List[(Int, T)]): List[Any] = list match {
- case h :: tail => Array.fill(h._1) { h._2 } :: decode(tail)
- case Nil => Nil
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement