Hello Thomas. > If you want alphabetic ordering, you should avoid symbol->string, because > it copies the name of the symbol to a new string -- this is necessary as > Scheme's strings are mutable objects!
With some exceptions, like ... symbol->string :-) "It is an error to apply mutation procedures like string-set! to strings returned by this procedure." from <www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.3.3> > I would suggest accessing the name > slot of the symbol directly and defining > > (define (symbol-compare a b) > (##sys#check-symbol a 'symbol-compare) > (##sys#check-symbol b 'symbol-compare) > (string-compare (##sys#slot a 1) (##sys#slot b 1))) > > I hope that helps, Thanks, I will test it now. Sven
pgpuZhwTWzDue.pgp
Description: PGP signature
_______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
