Paste number 96711: Would this work for Array .exists?

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:
Raw Source | XML | Display As
    # 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.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.