9 lines
197 B
Text
9 lines
197 B
Text
m@(Integer traits) ackermann: n@(Integer traits)
|
|
[
|
|
m isZero
|
|
ifTrue: [n + 1]
|
|
ifFalse:
|
|
[n isZero
|
|
ifTrue: [m - 1 ackermann: n]
|
|
ifFalse: [m - 1 ackermann: (m ackermann: n - 1)]]
|
|
].
|