Skip to content

Instantly share code, notes, and snippets.

Avatar

Miran narimiran

View GitHub Profile
View slicing.nim
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]
You can’t perform that action at this time.