| Paste number 96711: | Would this work for Array .exists? |
| Pasted by: | snarkyboojum |
| When: | 1 year, 10 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+22MF |
| Channel: | #perl6 |
| Paste contents: |
# I have a feeling this is dodgey, but works :)
multi method exists(@array: Int *@indices) {
my $exists = 0;
for @indices -> $index {
$exists = !?(@array[$index] ~~ Proxy);
last if ! $exists;
}
return $exists;
}
This paste has no annotations.