all repos — mn @ 70ce1af3f6d8c1ff7b0e96b23dd999cf9290abce

A truly minimal concatenative programming language.

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