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

plan 3;

my @x = before_incl * %% 5, (1 .. 9);
is-deeply @x, [1,2,3,4,5], "before_incl 5";

@x = before_incl { /foo/ }, <bar baz>;
is-deeply @x, [<bar baz>], 'Got the whole list';

@x = before_incl *.starts-with("b"), <alpha bar baz foo>;
is-deeply @x, [<alpha bar>], "before_incl /^b/";

# vim: expandtab shiftwidth=4


