Skip to content

Instantly share code, notes, and snippets.

@jeremytregunna
Created August 5, 2011 01:30
Show Gist options
  • Select an option

  • Save jeremytregunna/1126746 to your computer and use it in GitHub Desktop.

Select an option

Save jeremytregunna/1126746 to your computer and use it in GitHub Desktop.
// Io
tak := method(x, y, z,
if(y < x,
tak(tak(x - 1, y, z), tak(y - 1, z, x), tak(z - 1, x, y))
,
z
)
)
// Other
set tak, method x, y, z
if y < x,
tak tak x - 1, y, z., tak y - 1, z, x., tak z - 1, x, y.
else
z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment