P20 - Remove the kth element of a list.

Author: Ryan Connelly

Example

> say remove-at(<a b c d e>, 4);
a b c e

Source code: P20-topo.pl

use v6;

sub remove-at(@list is copy, $place)
{
    @list.splice($place - 1, 1);

    @list
}

say "{remove-at(<a b c d e>, 4)}";