author | Christian Urban <urbanc@in.tum.de> |
Sat, 12 Nov 2016 22:28:14 +0000 | |
changeset 41 | 1fe8205f6bdb |
parent 39 | c6fe374a5fca |
child 51 | 0e60e6c24b99 |
permissions | -rw-r--r-- |
// sudoku // some none // pattern matching //type abbreviations type Pos = (int, Int) //sorting, higher-order functions //lexicographic ordering // Implicits //=========== // // for example adding your own methods to Strings: // imagine you want to increment strings, like // // "HAL".increment // // you can avoid ugly fudges, like a MyString, by // using implicit conversions implicit class MyString(s: String) { def increment = for (c <- s) yield (c + 1).toChar } "HAL".increment