Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def combinations(occurrences: Occurrences): List[Occurrences] =
- if ( occurrences.isEmpty ) List()
- else
- for ( result <- combinations( occurrences.tail ); i <- 1 to occurrences.head._2 ) yield ( occurrences.head._1, i )::result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement