### ----------------------------------------------------
### -- List::MoreUtils
### -- Licenses: Artistic-2.0
### -- Authors: Elizabeth Mattijsen
### -- File: t/firstidx.rakutest
### ----------------------------------------------------
use Test;
use List::MoreUtils <firstidx first_index>;

plan 5;

ok &firstidx =:= &first_index, 'is firstidx the same as first_index';

my @list = 1 .. 10000;

is firstidx( { $_ >= 5000 }, @list), 4999,  "firstidx";
is firstidx( { not .defined }, @list), -1, "invalid firstidx";
is firstidx( { .defined }, @list), 0, "real firstidx";
is firstidx( { True }, ()), -1, "empty firstidx";

# vim: expandtab shiftwidth=4


