[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I step through this code?
From: |
jbranso |
Subject: |
Re: How can I step through this code? |
Date: |
Sat, 08 Oct 2022 15:03:54 +0000 |
October 7, 2022 9:25 PM, "jgart" <jgart@dismail.de> wrote:
> On Fri, 07 Oct 2022 21:52:40 +0000 jbranso@dismail.de wrote:
>
>> October 7, 2022 3:22 PM, "jgart" <jgart@dismail.de> wrote:
>>
>> On Fri, 07 Oct 2022 18:45:36 +0000 jbranso@dismail.de wrote:
>>
>> I wish guile had a nice debugger like elisp. :)
>>
>> I wish guile had a nice debugger like racket or common lisp. :)
>>
>> I haven't actually tried those debuggers...
>
> Just paste some guile code into drracket and press debug to start stepping
> through the Guile code.
That's smart!
>
> This guile code should work:
>
> (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)
>
> Just make sure you put the following at the top of the file:
>
> #lang racket
>
> Of course not all guile code would work because it's Guile and Racket
> but some subsets of Guile can be used from the drracket debugger.
>
> ;()
- How can I step through this code?, jgart, 2022/10/05
- Re: How can I step through this code?, jbranso, 2022/10/07
- Re: How can I step through this code?, jgart, 2022/10/07
- Re: How can I step through this code?, jbranso, 2022/10/07
- Re: How can I step through this code?, jgart, 2022/10/07
- Re: How can I step through this code?,
jbranso <=
- Re: How can I step through this code?, jgart, 2022/10/08
- Re: How can I step through this code?, jbranso, 2022/10/08
- Re: How can I step through this code?, jgart, 2022/10/09
- Re: How can I step through this code?, jbranso, 2022/10/10
- Re: How can I step through this code?, jgart, 2022/10/10
Re: How can I step through this code?, Ludovic Courtès, 2022/10/10