From e5724b7a1ec9c27bee097253134e5f4a7b47d5f9 Mon Sep 17 00:00:00 2001 From: Mike Pelletier Date: Wed, 28 Apr 2021 07:14:17 -0400 Subject: [PATCH] Explain `changed?` --- livesort_hssp/livesort.lissp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/livesort_hssp/livesort.lissp b/livesort_hssp/livesort.lissp index 1ff147e..59036ce 100644 --- a/livesort_hssp/livesort.lissp +++ b/livesort_hssp/livesort.lissp @@ -42,6 +42,11 @@ will update the display." "")) (unless (eq line (getitem self.screen lineno)) (setitem self.screen lineno line) + ;; `changed?` might have just been an explicit + ;; boolean value, but Hissp would prefer that we + ;; mutate values and not reassign variables. Since + ;; a `list` is an implicit boolean value, appending + ;; (or not) to it works fine. (.append changed? line) ;; ^[[K to erase any characters that follow on this line (.append output (.format "{}"