How to sort a list in scala - Stack Overflow
stackoverflow.com › questions › 40945873Dec 3, 2016 · just check the docs. List has several methods for sorting. myList.sorted works for types with already defined order (like Int or String and others). myList.sortWith and myList.sortBy receive a function that helps defining the order. Also, first link on google for scala List sort: http://alvinalexander.com/scala/how-sort-scala-sequences-seq-list-array-buffer-vector-ordering-ordered.