Tak (function)

From Wikipedia, the free encyclopedia

Tak is a recursive mathematical function defined as

def tak( x, y, z)
  unless y < x
    z
  else
    tak( 
         tak(x-1, y, z),
         tak(y-1, z, x),
         tak(z-1, x, y)
       )
  end
end

It is often used as a benchmark for languages with optimization for recursion

[edit] External links


In other languages