user
Task

Implement the algorithm to compute the principal   nth   root   

A

n
{\displaystyle {\displaystyle {\sqrt[{n}]{A}}}}
   of a positive real number   *A*,   as explained at the   Wikipedia page.
assistant
(formerly Perl 6)

```
sub infix:<√>($n, $A) {
    .tail given $A / $n, { (($n-1) * $_+ $A / ($_** ($n-1))) / $n } ... * ≅ *;
}

use Test;
plan 9;
is-approx ($_√pi)**$_, pi for 2 .. 10;

```