1use Test::More;
2use strict; use warnings FATAL => 'all';
3
4use List::Objects::WithUtils 'array';
5
6my $arr = array( 1 .. 7 );
7my $before = $arr->items_before_incl(sub { $_ == 4 });
8is_deeply
9  [ $before->all ],
10  [ 1 .. 4 ],
11  'items_before_incl ok';
12
13ok array->items_before_incl(sub { $_ == 1 })->is_empty,
14  'items_before_incl on empty array ok';
15
16done_testing;
17