Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
val list = listOf(2, 3, 5, 7, 11, 13, 17, 19, 23, 29)
list[!5] // [13, 17, 19, 23, 29]
list[!1/3] // [3, 5, 7]
list[!4/1] // [11, 7, 5, 3]
list[!2/-1] // [5, 7, 11, 13, 17, 19, 23, 29]
list[!3/0/1] // [7, 5, 3, 2]
list[!-1/1/2] // [29, 19, 13, 7, 3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.