π in APL

@TheForArkLD recommended that I make a pi approximation in APL, so here it is! By the way, I don't know if I did it the way you are technically supposed to, but it works! APL has almost no available documentation online...

You are viewing a single comment. View All
TheForArkLD (204)

Thanks :D
Really cool!
(Dyalog is our friends)

AmazingMech2418 (483)

@TheForArkLD I don't think Repl.it uses Dyalog. Loops don't work. I had to use tail-end recursion.

AmazingMech2418 (483)

@TheForArkLD Well, ngn doesn't support loops with the same syntax as Dyalog...

AmazingMech2418 (483)

@TheForArkLD You have to use tail-end recursion though...

TheForArkLD (204)
``````n←0
max←10
func←{
⍝Do something
n←n+1
{n < max:func 1} 1
}
func 1``````