I was going to ask this, but thought might be asked before. Is there an easy way to add a condition when using Cases to tell it what to generate for each pattern matched? For example, given
lis = {x, x + y, z + n};
Cases[lis, Alternatives[Plus[x_, y_], x_] :> {x, y}]
the result is {{x}, {x, y}, {n, z}} but I like the result to be {{x,0}, {x, y}, {n, z}}