Subject: bug#41636: closed (Re: [PATCH] combinators: Recurse fold2 to named let loop.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 01 Jun 2020 12:59:01 +0000

Your bug report

#41636: [PATCH] combinators: Recurse fold2 to named let loop.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
41636: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41636
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [PATCH] combinators: Recurse fold2 to named let loop.
From: Jakub Kądziołka <[email-masked]>
To: Arun Isaac <[email-masked]>
Cc: [email-masked]
Date: Mon, 1 Jun 2020 14:58:26 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On Mon, Jun 01, 2020 at 05:41:13AM +0530, Arun Isaac wrote:
> * guix/combinators.scm (fold2): Recurse to named let loop, not fold2 itself.
> ---
>  guix/combinators.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks for the patch! I agree that this is better for consistency, thus
I have pushed your patch as commit 7a99c58c4597a550703f32018efafb0fe84d5c72.

Cheers!

Subject: [PATCH] combinators: Recurse fold2 to named let loop.
From: Arun Isaac <[email-masked]>
To: [email-masked]
Cc: Arun Isaac <[email-masked]>
Date: Mon, 1 Jun 2020 05:41:13 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

* guix/combinators.scm (fold2): Recurse to named let loop, not fold2 itself.
---
 guix/combinators.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/combinators.scm b/guix/combinators.scm
index 11cad62ccf..4707b59363 100644
--- a/guix/combinators.scm
+++ b/guix/combinators.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2014 Eric Bavier <[email-masked]>
+;;; Copyright © 2020 Arun Isaac <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -56,7 +57,7 @@
            (call-with-values
                (lambda () (proc (car lst1) (car lst2) result1 result2))
              (lambda (result1 result2)
-               (fold2 proc result1 result2 (cdr lst1) (cdr lst2)))))))))
+               (loop result1 result2 (cdr lst1) (cdr lst2)))))))))
 
 (define (fold-tree proc init children roots)
   "Call (PROC NODE RESULT) for each node in the tree that is reachable from
-- 
2.26.2