Email list hosting service & mailing list manager

Announcement Loop Facility Marc Nieper-Wißkirchen (16 Aug 2022 08:31 UTC)
Re: Announcement Loop Facility Lassi Kortela (16 Aug 2022 09:03 UTC)
Re: Announcement Loop Facility Vladimir Nikishkin (16 Aug 2022 09:24 UTC)
Re: Announcement Loop Facility Marc Nieper-Wißkirchen (16 Aug 2022 09:43 UTC)
Re: Announcement Loop Facility Marc Nieper-Wißkirchen (16 Aug 2022 10:01 UTC)
Re: Announcement Loop Facility Ricardo G. Herdt (16 Aug 2022 10:04 UTC)
Re: Announcement Loop Facility Lassi Kortela (16 Aug 2022 10:17 UTC)
Re: Announcement Loop Facility Ricardo G. Herdt (16 Aug 2022 10:22 UTC)
Re: Announcement Loop Facility Marc Nieper-Wißkirchen (16 Aug 2022 10:39 UTC)
Name of the loop macro Lassi Kortela (16 Aug 2022 10:55 UTC)
Re: Name of the loop macro John Cowan (16 Aug 2022 11:03 UTC)
Re: Name of the loop macro Jakub T. Jankiewicz (16 Aug 2022 11:18 UTC)
Re: Name of the loop macro Marc Nieper-Wißkirchen (16 Aug 2022 11:25 UTC)
Changing the binding of quote et.al. Lassi Kortela (16 Aug 2022 11:46 UTC)
Re: Name of the loop macro John Cowan (16 Aug 2022 11:57 UTC)
Re: Name of the loop macro Marc Nieper-Wißkirchen (16 Aug 2022 12:33 UTC)
Re: Name of the loop macro Marc Nieper-Wißkirchen (16 Aug 2022 11:16 UTC)

Re: Announcement Loop Facility Lassi Kortela 16 Aug 2022 10:17 UTC

> Out of curiosity, do you plan to call it 'loop'? That will probably
> break all my code, I should start renaming my named lets to 'lp' :)

At least in R7RS, the following seems to work as intended:

(import (scheme base) (scheme write))

(define-syntax loop
   (syntax-rules ()
     ((loop . ignored)
      (syntax-error "No loop for you!"))))

(define (my-iota n)
   (let loop ((n n) (list '()))
     (let ((n (- n 1)))
       (if (negative? n) list (loop n (cons n list))))))

(write (my-iota 10))
(newline)