@define foo(y) { switch (y) { @match [1,2,x]: @match [1,x]: @match [x,1]: printf("%d\n",x); break; default: printf("failed\n"); } } foo([1,2]); foo([3,1]); foo([1,2,7]);