what is the easiest way to generate (in Mathematica) ALL terms given some
function symbols and their arities
and variables x,y, like e.g. f unary, g binary, up to depth N?
Or even better, to generate *next* term at one step, so that all terms will be reached exactly once.
Thank you, JP