From 8c04ed25aa804cc00d01b14d4059e13ab9c27f84 Mon Sep 17 00:00:00 2001 From: Ringo Wantanabe Date: Sat, 6 Apr 2019 17:53:20 +0100 Subject: [PATCH] Something was different I dunno what --- flan-utils.lisp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/flan-utils.lisp b/flan-utils.lisp index b677a8f..cccc938 100644 --- a/flan-utils.lisp +++ b/flan-utils.lisp @@ -108,8 +108,8 @@ (with-output-to-string (stream) (apply #'format `(,stream ,fmt . ,r)))) - (defun get-all-symbols () + "Gets all symbols" (let ((lst '())) (do-all-symbols (s lst) (push s lst)) @@ -226,20 +226,29 @@ ;; --- progressive evals (defmacro progen (&rest things) + "mapn eval things" `(mapn #'eval '(,@things))) (defmacro proge1 (&rest things) + "map1 eval things" `(map1 #'eval '(,@things))) (defmacro progenth (n &rest things) + "mapnth eval n things" `(mapnth #'eval ,n '(,@things))) (defmacro progev (&rest things) + "mapv eval things" `(mapv #'eval '(,@things))) (defmacro progel (&rest things) + "mapcar eval things" `(mapcar #'eval '(,@things))) +(defmacro progenc (&rest things) + "mapcan eval things" + `(mapcan #'eval '(,@things))) + (defmacro yield-return (&rest things) "Create yield block, returns last of push()ed outputs of yield() (so, last is first etc)" `(let ((--yield-vars '()) @@ -396,7 +405,7 @@ (set-macro-character char nil) (values (read-from-string (strcat (string char) (write-to-string (read stream t nil t)))) nil)))) -(defun bang-reader (stream char) +(defun not-reader (stream char) (declare (ignore char)) (list (quote not) (read stream t nil t))) @@ -441,7 +450,7 @@ (set-macro-character #\[ 'export-reader) ;"Exports all in brackets []" (set-macro-character #\] 'read-delimiter) (set-macro-character #\$ 'async-reader) ;"Run statement in seperate thread" - (set-macro-character #\¬ 'bang-reader) ;"Negates next statement" + (set-macro-character #\¬ 'not-reader) ;"Negates next statement" (set-macro-character #\£ 'lambda-reader) ;"Wrap statement in lambda" (set-macro-character #\€ 'top-level-reader))) ;"Run at compile,load and execute"