implemented ackermann function in ruby