\ Taken from http://rosettacode.org 
\ 4tH version 2010, Hans Bezemer

[UNDEFINED] ackermann [IF]
: ackermann                            ( m n -- u )
  over
  IF                                   ( m-1 n -- )
    swap 1- swap dup
    IF
      1- over 1+ swap recurse recurse exit
    ELSE
      1+ recurse exit                  \ allow tail recursion
    THEN
  ELSE
    nip 1+
  THEN
;
[THEN]

\ 0 0 ackermann . (    1  ok)
\ 0 4 ackermann . (    5  ok)
\ 1 4 ackermann . (    6  ok)
\ 2 4 ackermann . (   11  ok)
\ 3 3 ackermann . (   61  ok)
\ 3 4 ackermann . (  125  ok)
\ 3 5 ackermann . (  253  ok)
\ 3 6 ackermann . (  509  ok - overflow)
\ 3 7 ackermann . ( 1021  ok - overflow)
\ 3 8 ackermann . ( 2045  ok - overflow)