Ackermann (stella v0.7.0)

Ackermann function is one of the simplest example of a total computable function that is not primitive recursive.

Link to this section Summary

Functions

Run Ackermann function for given initials More info on Wikipedia page

Link to this section Functions

@spec ack(non_neg_integer(), number()) :: number()

Run Ackermann function for given initials More info on Wikipedia page

examples

Examples

iex> Ackermann.ack(0, 1)
2

iex> Ackermann.ack(3, 6)
509