[Top][All Lists]

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

Re: How can I step through this code?

From: jgart
Subject: Re: How can I step through this code?
Date: Mon, 10 Oct 2022 12:00:33 -0500

On Mon, 10 Oct 2022 18:04:57 +0200 Ludovic Courtès <> wrote:
> What you can do though, 

Thanks Ludo! Much appreciated!! I hadn't used ,optimize metacommand yet. I've 
pk in Guile and Racket but not regularly tbh. Maybe I should start.

Ludo, how would you step through this code?

(define (list-index l k)
  (let loop ((n 0)
             (l l))
    (and (not (null? l))
         (if (eq? (car l) k)
             (loop (+ n 1) (cdr l))))))

(list-index '(1 2 3 4 5 6 7 8 9) 2)

What is your approach with Guile?

all best,


reply via email to

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