- or download this
my $v1 = vector(1,2,3,4,5);
my @filter = qw(1 0 0 1 1);
my $cv = computed($v1);
$cv->set_filter(@filter);
- or download this
my $v1 = vector(1,2,3,4,5);
my $compV1 = computed($v1);
...
say $compV1;
$compV1-> set_filter( sub { grep { $filter[$_] } 0..$#_ } );
say $compV1;
- or download this
[1, 2, 3, 5, 7]
[0, 1, 2, 3]