Created
October 7, 2018 14:46
-
-
Save Nublo/1f047f4a60a3ba78d03cf0a952257d9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val <T> List<T>.size: Int | |
get() = when (this.isEmpty()) { | |
true -> 0 | |
false -> 1 + this.tail.size | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment