Construct an element with initial values.
Iterator in Kotlin
Tips and Traps¶
- Notice that Iterable.map
returns a List instead of an iterator.
Since almost all collections in Kotlin eventually inherit from
Iterable, themapmethod of all collections (includingHashMap) in Kotlin returns List.
List in Kotlin
Create an Empty List¶
Sort a List in Kotlin
sorted¶
If elements in a List implements the Comparable interface,
you can call the method sorted to return a sorted List (in nature order).
Note: Pair in Kotin does not implement the Comparable interface!!!
Returns and Jumps in Kotlin
Break at label is a convenient way to jump out of a nested loop.
Use Snap Apps in Docker
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Snap app is not (and will probably never be) compatible with Docker by default. However, there are some hackings to make snap app to work in Docker. Also, Kata Container is …