Advertisement
Guest User

Untitled

a guest
Mar 12th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.46 KB | None | 0 0
  1.     def combinate(leftovers: List[(Char,Int)]): List[List[(Char,Int)]] = {
  2.       leftovers match {
  3.         case Nil => List()
  4.         case char :: chars =>
  5.             (
  6.             for(n<-0 to char._2) yield
  7.                 List( (char._1,n) ) ::: combinate(chars)
  8.             ).toList
  9.       }
  10.     }
  11.  
  12. Description Resource    Path    Location    Type
  13. type mismatch;  found   : List[List[Product]]  required: List[List[(Char, Int)]]    debug.sc    /progfun-forcomp    line 25 Scala Problem
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement