Hi. I'm a newbie and I'm trying to write some programs in Guile. I'd like to know how I can perform a substitution in a list. I mean:I want to write a function that takes two arguments: a list (possibly nested) of symbols [e.g ((a (b c) d) a (f b))] and another list that indicate what sort of substitution the function should perform [e.g. ((a z) (b y))]. This means that the symbol "a" has to be substituted by the symbol "z" and the symbol "b" by "y".
This example shows you what I need to do: The following should return TRUE: (equal? (substitute '((a (b c) d) a (f b)) '((a z) (b y)) ) '((z (y c) d) z (f y)) ) ------------------------------------------------------ Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada23gen07 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user