[gambit-list] Confused

Marc Feeley feeley at iro.umontreal.ca
Fri Oct 15 16:17:31 EDT 2010


It is because "else" is a special keyword that is searched at the head of a clause.  Rebinding "else" will not change the search.  Should it?

I checked and Bigloo and Chicken behave the same as Gambit, but MzScheme doesn't.

Marc

On 2010-10-15, at 4:00 PM, Bradley Lucier wrote:

> Marc:
> 
> Can you explain what's going on here?  I would expect both expressions to print the same.
> 
> Brad
> 
> [Bradley-Luciers-MacBook-Pro:~] lucier% gsi cond-test.scm
> a
> #!void
> [Bradley-Luciers-MacBook-Pro:~] lucier% cat cond-test.scm
> (pretty-print (let ((else #f))
>                (cond (else 'a))))
> (pretty-print (cond (#f 'a)))
> [Bradley-Luciers-MacBook-Pro:~] lucier% gsi -v
> v4.6.0 20100716125419 i386-apple-darwin10.4.0 "./configure CC=/pkgs/gcc-4.5.1/bin/gcc -fschedule-insns -march=native --enable-single-host --enable-multiple-versions --enable-shared"




More information about the Gambit-list mailing list