fun jota x = map (fn x = x-1) ` iota x fun test_tuples (x, y) = append_map (fn a = map (fn b = (b, a)) ` jota x) ` jota y map ackermann (test_tuples(4,9))