gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 01/02: utils/hat-let: New ^! construct.


From: gnunet
Subject: [gnunet-scheme] 01/02: utils/hat-let: New ^! construct.
Date: Sun, 23 Jan 2022 17:59:17 +0100

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 82f122e8bf5814571e72444eb24cbcef9df1695a
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Fri Jan 21 19:47:11 2022 +0000

    utils/hat-let: New ^! construct.
    
    It will be used by the DHT code.
    
    * gnu/gnunet/utils/hat-let.scm (let^)[^!]: New case.
---
 gnu/gnunet/utils/hat-let.scm | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gnu/gnunet/utils/hat-let.scm b/gnu/gnunet/utils/hat-let.scm
index 825c606..df280a0 100644
--- a/gnu/gnunet/utils/hat-let.scm
+++ b/gnu/gnunet/utils/hat-let.scm
@@ -1,5 +1,5 @@
 ;;   This file is part of scheme-GNUnet, a partial Scheme port of GNUnet.
-;;   Copyright (C) 2020, 2021 GNUnet e.V.
+;;   Copyright (C) 2020--2022 GNUnet e.V.
 ;;
 ;;   scheme-GNUnet is free software: you can redistribute it and/or modify it
 ;;   under the terms of the GNU Affero General Public License as published
@@ -33,8 +33,9 @@
 ;;   * (2 2): Make (! (procedure-name argument) code code* ...)
 ;;            usable.
 ;;   * (2 3): Allow dotted variable lists with <--.
+;;   * (2 4): New: !^
 
-(library (gnu gnunet utils hat-let (2 2))
+(library (gnu gnunet utils hat-let (2 4))
   (export let^)
   ;; Avoid letting users of (gnu gnunet utils hat-let)
   ;; having to import _ from (rnrs base).
@@ -58,6 +59,14 @@
        (let ((x (lambda args body ...)))
         (let^ (etc ...)
               code ...)))
+      ;; Define a procedure, and let the body of the procedure be
+      ;; a let^ form.  @var{docstring} is assumed to be a literal string.
+      ((: ((!^ (x . args) docstring bindings body ...) etc ...) code ...)
+       (let^ ((! (x . args)
+                docstring
+                (let^ bindings body ...))
+             etc ...)
+            code ...))
       ;; Bind y to x
       ((: ((! x y) etc ...) code ...)
        (let ((x y))

-- 
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]