Created
September 5, 2017 17:02
-
-
Save narimiran/c3b9179b82380e17f0b4b98a1acf0ef2 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
proc `[]`[T](s: openarray[T], start: int, stop: int, step: int): seq[T] = | |
result = newSeq[T]() | |
for i in countup(start, stop, step): | |
result.add(s[i]) | |
let x = toSeq(0..20) | |
echo x[3, 13, 2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment