On Mon, 10 Oct 2022 18:04:57 +0200 Ludovic Courtès <[email protected]> wrote:
> What you can do though,
Thanks Ludo! Much appreciated!! I hadn't used ,optimize metacommand yet. I've
used
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)
n
(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,
jgart