gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] 116/324: utils: hat-let: Fix inline procedure definition


From: gnunet
Subject: [gnunet-scheme] 116/324: utils: hat-let: Fix inline procedure definitions.
Date: Tue, 21 Sep 2021 13:22:36 +0200

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit 03527f83517dcbec20f084c02a04b2e27095071a
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Fri Jul 2 23:10:41 2021 +0200

    utils: hat-let: Fix inline procedure definitions.
    
    The syntax for procedure bindings needs to match
    before the syntax for generic bindings.
    
    * gnu/gnunet/utils/hat-let.scm (let^): Move the
      code for inline procedure definitions a little
      upwards.
---
 gnu/gnunet/utils/hat-let.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/gnu/gnunet/utils/hat-let.scm b/gnu/gnunet/utils/hat-let.scm
index 9382867..181ed5a 100644
--- a/gnu/gnunet/utils/hat-let.scm
+++ b/gnu/gnunet/utils/hat-let.scm
@@ -30,8 +30,10 @@
 ;;          with <--.
 ;;   * (2 1): Refer to '_' as a symbol, not as the _ from
 ;;            (rnrs base)
+;;   * (2 2): Make (! (procedure-name argument) code code* ...)
+;;            usable.
 
-(library (gnu gnunet utils hat-let (2 1))
+(library (gnu gnunet utils hat-let (2 2))
   (export let^)
   ;; Avoid letting users of (gnu gnunet utils hat-let)
   ;; having to import _ from (rnrs base).
@@ -50,15 +52,15 @@
        (if x
           (begin esc esc* ...)
           (let^ (etc ...) code ...)))
-      ;; Bind y to x
-      ((: ((! x y) etc ...) code ...)
-       (let ((x y))
-        (let^ (etc ...) code ...)))
       ;; Define a procedure
       ((: ((! (x . args) body ...) etc ...) code ...)
        (let ((x (lambda args body ...)))
         (let^ (etc ...)
               code ...)))
+      ;; Bind y to x
+      ((: ((! x y) etc ...) code ...)
+       (let ((x y))
+        (let^ (etc ...) code ...)))
       ;; Assert it is true!
       ((: ((!! x) etc ...) code ...)
        (begin

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]