(define-global cut (x &optional from upto) (with l (dup x) (let (j 0 i (if (or (nil? from) (< from 0)) 0 from) n (\# x) upto (if (or (nil? upto) (> upto n)) n upto)) (while (< i upto) (set (at l j) (at x i)) (inc i) (inc j)) (each (k v) x (unless (number? k) (set (get l k) v))))))
Emacs' reader can also be completely overridden by user code. I used this technique to port pg's Arc to elisp: https://repl.it/repls/UnluckySturdyCharactercode#main.el
(If you click "run" and type #\a you'll notice you get "a" rather than a syntax error.)
[1] Lumen lisp: https://github.com/sctb/lumen
Emacs' reader can also be completely overridden by user code. I used this technique to port pg's Arc to elisp: https://repl.it/repls/UnluckySturdyCharactercode#main.el
(If you click "run" and type #\a you'll notice you get "a" rather than a syntax error.)
[1] Lumen lisp: https://github.com/sctb/lumen