Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
32
Task/Ackermann-function/Babel/ackermann-function.pb
Normal file
32
Task/Ackermann-function/Babel/ackermann-function.pb
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
main:
|
||||
{((0 0) (0 1) (0 2)
|
||||
(0 3) (0 4) (1 0)
|
||||
(1 1) (1 2) (1 3)
|
||||
(1 4) (2 0) (2 1)
|
||||
(2 2) (2 3) (3 0)
|
||||
(3 1) (3 2) (4 0))
|
||||
|
||||
{ dup
|
||||
"A(" << { %d " " . << } ... ") = " <<
|
||||
reverse give
|
||||
ack
|
||||
%d cr << } ... }
|
||||
|
||||
ack!:
|
||||
{ dup zero?
|
||||
{ <-> dup zero?
|
||||
{ <->
|
||||
cp
|
||||
1 -
|
||||
<- <- 1 - ->
|
||||
ack ->
|
||||
ack }
|
||||
{ <->
|
||||
1 -
|
||||
<- 1 ->
|
||||
ack }
|
||||
if }
|
||||
{ zap 1 + }
|
||||
if }
|
||||
|
||||
zero?!: { 0 = }
|
||||
Loading…
Add table
Add a link
Reference in a new issue