Re: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-03 Thread Stefan Israelsson Tampe
No I wanted to say that you create a linearisation of the search and apply tourtouse hare on that. One can make that linearisation fast for list traversals but expensive for deep trees. To note here is that if we had one bit to spare for every cons representation we could do use that bit to mark

Re: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-03 Thread Stefan Israelsson Tampe
I actually implemented an algorithm to handle infinite trees that we could use if we like. Enjoy! On Mon, Sep 3, 2012 at 12:07 AM, Ludovic Courtès l...@gnu.org wrote: Hi, Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: The cycle detection for a tree would probably look

Re: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-03 Thread Ludovic Courtès
Hi, Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: (define (c-equal-1 x y) (match x (((and xx (_ . _)) . _) [...] ((xx . _) [...] (_ (equal? x y Doesn’t this mean that ‘cycle-equal?’ falls back to ‘equal?’ for non-pairs? Ludo’.