daily pastebin goal
90%
SHARE
TWEET

Untitled

a guest Mar 16th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val comb = List(('b',1))                        //> comb  : List[(Char, Int)] = List((b,1))
  2.  
  3.   ('a',2) match {
  4.     case(c,x) => for {
  5.         i <- 1 to x
  6.     } yield( (c,i) :: comb )
  7.     case _ => List()
  8.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top