From 0b66ce5dc1bb539c78aee01cf48faaa334720218 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 11 Feb 2025 00:29:37 +0000 Subject: Slightly clean up the example program in main --- main.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.lisp b/main.lisp index 7d52e22..5c324af 100644 --- a/main.lisp +++ b/main.lisp @@ -27,7 +27,7 @@ (fn parse-integers (input) (-> (string) list) (->> input - (uiop:split-string) + uiop:split-string (mapcar #'parse-integer*) (remove-if #'null))) @@ -39,9 +39,11 @@ (let ((inp (read-integers))) (while (null inp) (format t "Need at least one integer...~%") + (force-output) (setq inp (read-integers))) inp)) (defun start () (--> (read-until-integers) - (format t "~a = ~a~%" (cons '+ _) (reduce #'+ _)))) + (cons '+ _) + (format t "~a = ~a~%" _ (eval _)))) -- cgit v1.2.3-13-gbd6f