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 c

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 wrote: > Hi, > > Stefan Israelsson Tampe skribis: > > > The cycle detection for a tree would probably look something like, > > Tortoise-and-hare

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

2012-09-03 Thread Ludovic Courtès
Hi, Stefan Israelsson Tampe 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’.

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

2012-09-03 Thread Stefan Israelsson Tampe
Yes, so it is no real replacement. For that we need yo hamdle vectors , structs etc. Eg cycles is only allowed in the pair part. If we wan't this for the general case, please ask! /stefan Den 3 sep 2012 23:12 skrev "Ludovic Courtès" : > Hi, > > Stefan Israelsson Tampe skribis: > > > (define (