Guest User

Untitled

a guest
Feb 21st, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. def ackermann m, n
  2. return n + 1 if m == 0
  3. return ackermann(m-1, n) if n == 0
  4. return ackermann(m-1, ackermann(m, n-1))
  5. end
  6.  
  7. puts ackermann(4,1)
Add Comment
Please, Sign In to add comment