test: replace print with call to Ackermann function

This commit is contained in:
Alex Shelkovnykov 2023-09-05 23:18:05 -06:00
parent 0480fe615b
commit 8816d470c9
2 changed files with 11 additions and 1 deletions

View File

@ -196,6 +196,10 @@
::
:: List logic
::
++ snoc :: append to end of list
|* [a=(list) b=*]
(weld a ^+(a [b]~))
::
++ flop :: reverse
~/ %flop
|* a=(list)

View File

@ -17,6 +17,12 @@
++ pair |$ [head tail] [p=head q=tail]
+$ path (list knot)
+$ wire path
++ ack
|= [m=@ud n=@ud]
?~ m +(n)
?~ n
$(m (dec m), n 1)
$(m (dec m), n $(n (dec n)))
-- =>
::
|%
@ -28,7 +34,7 @@
^- ^
:: ~> %slog.[0 'got']
:: ~> %slog.[0 -.card.ovo]
=/ fec [//term/1 %blit [%put "effect"] [%nel ~] ~]
=/ fec [//term/1 %blit [%put (snoc "A(2,1) = " (add 48 (ack 2 1)))] [%nel ~] ~]
[[fec ~] ..poke]
--
::