(mac ! (a b . body) (cons b (cons a body)))
(! "0123test" slice 1)
(! "hello world!!!" @ 0 -3) ; => "hello world"
-----
(def subseq (seq start (o end (len seq))) - (if (isa seq 'string) - (let s2 (newstring (- end start)) - (for i 0 (- end start 1) - (= (s2 i) (seq (+ start i)))) - s2) - (firstn (- end start) (nthcdr start seq)))) + (with ( + start (if (< start 0) (+ (len seq) start) start) + end (if (< end 0) (+ (len seq) end) end)) + (if (isa seq 'string) + (let s2 (newstring (- end start)) + (for i 0 (- end start 1) + (= (s2 i) (seq (+ start i)))) + s2) + (firstn (- end start) (nthcdr start seq))))) (subseq "hello" 0 -1) => "hell" (subseq "hello world" -5) => "world" (subseq "hello world" -4 -2" => "or"