;d like things to be
different I'm not deluded enough to think functional programming is a
primary focus nowadays. But being able to solve problems like the one
you presented here is part of the difference between someone assembling
kludges for a living, and a real computer scientist. Make the right choice.
Best wishes for your life,
--
Luca Saiu, maintainer of GNU epsilon
http://www.gnu.org/software/epsilon
http://www.di.unipi.it/~saiu
___
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
would be better to test each symbol once.
An asymptotically optimal solution would be making a hash from the
alist, and iterating on the (reversed) list just once, as you do; I
guess I'd go for it in a practical case.
I was just trying to be didactic. :-)
--
Luca Saiu, maintainer o
that case).
Finally you have to implement substitute-single: with only one symbol
to replace it's easy: you just recur on the list searching for all
the occurrences of symbol.
(define (substitute-single list symbol replacement)
...)
Both functions, as it's very usual, are built on