From: lisp <ori...@li...> - 2007-01-22 17:49:48
|
Hi. I'm a newbie and I'm learning Scheme. 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 where the atoms are 1-character strings and a list of replacements (each describing a 1-character string and its 1-character replacement). It should yield the list whic results from performing the substitutions specified in the list pairs on the input list. E.g. substitute ((a (b c) d) a (f b)) ((a z) (b y)) returns the list ((z (y c) d) z (f y)) Thanks in advance. Ori -- View this message in context: http://www.nabble.com/substitution-tf3059188.html#a8506074 Sent from the clisp-list mailing list archive at Nabble.com. |