sub nth { my $ll = shift; my $n = shift; die "Invalid argument: $n\n" if $n < 0; return $n == 0 ? head( $ll ) : nth( tail( $ll ), $n - 1 ); }