Factored out the REPL.
authorSaba Saba <saba@sabadev.xyz>
Thu, 9 Feb 2023 17:26:21 +0000 (12:26 -0500)
committerSaba Saba <saba@sabadev.xyz>
Thu, 9 Feb 2023 17:26:21 +0000 (12:26 -0500)
git-repl.cl

index beadcc5..a024b67 100644 (file)
   (write-line "Run (exit) to exit gracefully.")
   nil)
 
+(defun repl ()
+  (loop
+    (progn
+      (format t "> ")
+      (force-output)
+      (print (eval (read)))
+      (terpri)
+      (force-output))))
+
 (defun main ()
   (progn
     (help)
-    (loop
-      (progn
-        (format t "> ")
-        (force-output)
-        (print (eval (read)))
-        (terpri)
-        (force-output)))))
+    (repl)))
 
 (defun-public make (&key (executable-name *installation-file*) (source-file "git-repl.cl"))
   "Compiles the current state into an executable"