summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-11-01 22:50:45 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-11-01 22:50:45 +0100
commit7288e28b8179b4e9e96bff50e31b88b8cab2edc9 (patch)
treebb991abed3f533ed96a28163843cc5f2f9072437
parenta5892920175dc7d5cf5b25a26b06476d7ef0b9fd (diff)
downloadmew-7288e28b8179b4e9e96bff50e31b88b8cab2edc9.tar.gz
mew-7288e28b8179b4e9e96bff50e31b88b8cab2edc9.tar.xz
mew-7288e28b8179b4e9e96bff50e31b88b8cab2edc9.zip
list-ref-default: fix logic
-rw-r--r--mew.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/mew.scm b/mew.scm
index 02d0dd5..a623b74 100644
--- a/mew.scm
+++ b/mew.scm
@@ -212,11 +212,11 @@
        (while (not cond) body ...))))
 
   (define (list-ref-default l i default)
-    (if (zero? i)
-        (if (null? l)
-            default
-            (car l))
-        (list-ref-default (cdr l) (- i 1) default)))
+    (if (null? l)
+      default
+      (if (zero? i)
+        (car l)
+        (list-ref-default (cdr l) (- i 1) default))))
 
   (define (vector-ref-default v i default)
     (if (< i (vector-length v))