< Back to IRCAM Forum

Recursion and accum with multiple inlets

Happy Saturday!

Working on a new task. How to implement recursion to modify a string or list with multiple edits where all edits are composited to one string or list?

For example:

“passepartout” where all vowels (a,e,i,o,u) are replaced with #\8

result: “p8ss8p8rt88t”

I have been trying to experiment with the accum object in a loop and it is making a bit more sense but I am now at a stage where I have to use multiple inlets into the lambda function for the accum object. (The string to modify and the letters which will be modified). How do you use the recursion ‘loose unconnected inlet’ with multiple variables? How does it know how to map?

Any help is appreciated. :slight_smile:

Recursion Implementation.omp (9.8 KB)


In this case, i would not use a accum here, most particularly if you have a big text to modify. I would go like this:

It is simpler, and i think more economic computing wise.

Here is the patch:
recursion implementation-1.omp (16.3 KB)