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

Re: Bug & co



> I think the function `reverse!' in MzScheme 103 is buggy. The behavior
> is the following : 
> > (define l '(a b c d))
> > (reverse! l)
> (d c b a)
> > l
> (a)
> ^^^  I think that '(d c b a) can be expected here, no?

     I think that the behaviour of functions with side-effects is undefined on 
pairs that are not allocated at run-time :  when l is defined by (define l '(a 
b c d)) instead of (define l (list 'a 'b 'c 'd)), pairs are built at compile-
time...

          Yannis


======================================================================
Esterel Technologies                      www.esterel-technologies.com
Core Technology Group                     +33 (4) 92 02 40 63
Twins 2, 885 Av Julien Lefebvre
06270 Villeneuve Loubet
FRANCE
----------------------------------------------------------------------
CMA-EMP / INRIA                           www.esterel.org
----------------------------------------------------------------------
+33 (6) 60 38 79 52                       www.yannisbres.net
======================================================================