Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 7d9c16311e
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (16 sloc) 0.308 kB
#!/usr/bin/env perl6
use v6;
sub drop-nth(@list, $n)
my $count = 1;
gather for @list -> $e
take $e if not $count++ %% $n;
say drop-nth(<a b c d e f g h i j k l m n>.list, 3);
=begin pod
=head1 NAME
P16 - Drop every C<n>th element from a list.
=end pod
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.