shithub: sl

Download patch

ref: 1820b6e70a22e92f69dab14a1d2368b98b96d501
parent: 9a206b8d44ec5a94593bf9b030fe308c16461e5e
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Mar 11 20:52:44 EDT 2025

zip, zip-with: simplify

--- a/boot/sl.boot
+++ b/boot/sl.boot
@@ -450,5 +450,5 @@
 	    vinfo #fn("n30182e3:" #() vinfo) vinfo:heap? #.cadr vinfo:index
 	    #4# vinfo:sym #.car void
 	    #1# void? #fn("n10IQ:" #() void?) zero?
-	    #fn("n10El2:" #() zero?) zip #fn("z070710P}2:" #(zip-with list) zip) zip-with
-	    #fn("z1200>11}2:" #(#fn("z070A0}3:" #(map))) zip-with))
+	    #fn("n10El2:" #() zero?) zip #fn("z070710}3:" #(map list) zip) zip-with
+	    #fn("z17001}3:" #(map) zip-with))
--- a/src/system.lsp
+++ b/src/system.lsp
@@ -476,11 +476,10 @@
 ; you are not expected to understand this -- spew
 
 (def (zip-with f . lst)
-  (apply (λ x (apply map f x))
-         lst))
+  (apply map f lst))
 
 (def (zip . lst)
-  (apply zip-with (cons list lst)))
+  (apply map list lst))
 
 ;;; backquote