summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-11-07 16:12:26 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-11-07 16:12:26 +0100
commit40befb16fe6c3210a2473e20ef70897058d97a60 (patch)
treeb2d97a8c2cb62598b49ec5e50355e2800c446257
parent18be3c0cbc71e19f0ec671b0901fee0ef3596415 (diff)
downloadmew-40befb16fe6c3210a2473e20ef70897058d97a60.tar.gz
mew-40befb16fe6c3210a2473e20ef70897058d97a60.tar.xz
mew-40befb16fe6c3210a2473e20ef70897058d97a60.zip
use list-tabulate instead of map/iota
-rw-r--r--mew.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/mew.scm b/mew.scm
index 6428208..31ad492 100644
--- a/mew.scm
+++ b/mew.scm
@@ -577,8 +577,8 @@
   (define (~? str pat)
     (let ((data (irregex-search pat str)))
       (if data
-        (map (op irregex-match-substring data _)
-             (iota (inc (irregex-match-num-submatches data))))
+        (list-tabulate (inc (irregex-match-num-submatches data))
+                       (op irregex-match-substring data _))
         #f)))
 
   (define (gmatch pat str)
@@ -593,8 +593,8 @@
                          (irregex-match-end-index data 0))
                   (set! start (inc start)))
                 (if (> (irregex-match-num-submatches data) 0)
-                  (map (op irregex-match-substring data _)
-                       (iota (inc (irregex-match-num-submatches data))))
+                  (list-tabulate (inc (irregex-match-num-submatches data))
+                                 (op irregex-match-substring data _))
                   (irregex-match-substring data 0)))
               (begin
                 (set! start -1)