Recently Written · git

Forthe

Forth-like DSL.

git clone https://github.com/equwal/Forthe

Log | Files | Refs


commit fc9f405991c4c20c1e5f4b3c3ddffe7690aafcff
Spenser Truex <spensertruexonline@gmail.com>
2019-06-23 10:07:05 -0700

code minification: https://www.reddit.com/user/npostavs/

 eforth.el | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/eforth.el b/eforth.el
index 08fc64a..6aefe87 100644
--- a/eforth.el
+++ b/eforth.el
@@ -132,23 +132,19 @@
 ;;
 
 ;;; Code:
-(require 'cl-lib)
 
 (defun eforth--inner (lang list)
   "Internal function for the `eforth' macro.
 LANG are the bindings for the forth.
 LIST is full of the forth stack (RPN)."
-  (let ((s))
-    (cl-flet ((fn (fn) (if (functionp fn)
-                           fn
-                         (symbol-function fn))))
-      (dolist (i list)
-        (if (assoc i lang)
-            (let ((fn (cadr (assoc i lang))))
-              (if s
-                  (progn (apply (fn fn) s) (setf s nil))
-                (funcall (fn fn))))
-          (push i s))))))
+  (let (s)
+    (dolist (i list)
+      (if (assoc i lang)
+          (let ((fn (cadr (assoc i lang))))
+            (if s
+                (progn (apply fn s) (setf s nil))
+              (funcall fn)))
+        (push i s)))))
 
 (defmacro eforth (lang list)
   "Define and execute a forth language.