Skip to content

Instantly share code, notes, and snippets.

View narimiran's full-sized avatar

Miran narimiran

View GitHub Profile
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]