Created
September 5, 2017 16:58
-
-
Save def-/b2a308b705865ad182121df0a4688cfd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import sequtils | |
proc `[]`[T](s: openarray[T], x: int, y: Slice[int]): seq[T] = | |
result = newSeq[T]() | |
for i in countup(x, y.b, y.a - x): | |
result.add(s[i]) | |
let x = toSeq(0..20) | |
echo x[3,5..13] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment