Skip to content

Instantly share code, notes, and snippets.

@lameroid
Created April 10, 2017 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lameroid/5efda0a70e4d482041f59b7d208cd27e to your computer and use it in GitHub Desktop.
Save lameroid/5efda0a70e4d482041f59b7d208cd27e to your computer and use it in GitHub Desktop.
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