tak.awk 174 B

123456789
  1. function tak(x, y, z) {
  2. if (y < x) return tak(tak(x - 1, y, z), tak(y - 1, z, x), tak(z - 1, x, y));
  3. return z;
  4. }
  5. BEGIN {
  6. print tak(ARGV[1], ARGV[2], ARGV[3]);
  7. }