From 21369982d696c898b6ec7d96edba1aebaeaa5aa2 Mon Sep 17 00:00:00 2001 From: Saba Saba Date: Thu, 9 Feb 2023 12:26:21 -0500 Subject: [PATCH] Factored out the REPL. --- git-repl.cl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/git-repl.cl b/git-repl.cl index beadcc5..a024b67 100644 --- a/git-repl.cl +++ b/git-repl.cl @@ -225,16 +225,19 @@ (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" -- 2.20.1