mnpkg/baseutils.nim
1 2 3 4 5 6 7 8 9 10 11
import os proc reverse*[T](xs: openarray[T]): seq[T] = result = newSeq[T](xs.len) for i, x in xs: result[result.len-i-1] = x proc parentDirEx*(s: string): string = return s.parentDir