object HelloWorld { type Word = String type Occurrences = List[(Char, Int)] def wordOccurrences(w: Word): Occurrences = (w.toLowerCase().groupBy((element: Char) => element) map { case (k, v) => (k, v.length) }).toList }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more