Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object scratch {
- val names = List("ONE", "TWO", "THREE", "ETHR EEG", "ETHREEF")
- val whee = names.map( x => (x.filter{ z => ' ' != z}.distinct).length -> x)
- val mx = whee.maxBy[Int]( a => a._1)
- whee.filter( _._1 == mx._1).minBy[String](_._2)._2
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement