unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#41636] [PATCH] combinators: Recurse fold2 to named let loop.
@ 2020-06-01  0:11 Arun Isaac
  2020-06-01 12:58 ` bug#41636: " Jakub Kądziołka
  0 siblings, 1 reply; 2+ messages in thread
From: Arun Isaac @ 2020-06-01  0:11 UTC (permalink / raw)
  To: 41636; +Cc: Arun Isaac

* 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 <ludo@gnu.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; 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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#41636: [PATCH] combinators: Recurse fold2 to named let loop.
  2020-06-01  0:11 [bug#41636] [PATCH] combinators: Recurse fold2 to named let loop Arun Isaac
@ 2020-06-01 12:58 ` Jakub Kądziołka
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kądziołka @ 2020-06-01 12:58 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 41636-done

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

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!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-01 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-01  0:11 [bug#41636] [PATCH] combinators: Recurse fold2 to named let loop Arun Isaac
2020-06-01 12:58 ` bug#41636: " Jakub Kądziołka

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).