NAME
FP::OrderedCollection
SYNOPSIS
my
$c
= FP::OrderedCollection->new_from_values(
qw(a b c f)
);
ok
$c
->contains(
"a"
);
ok not
$c
->contains(
"q"
);
is
$c
->maybe_position(
"1"
),
undef
;
is
$c
->maybe_position(
"f"
), 3;
is_equal [
$c
->perhaps_following (
"xx"
)], [];
is_equal
$c
->perhaps_following(
"c"
), stream(
'f'
);
is_equal
$c
->perhaps_following(
"b"
), stream(
'c'
,
'f'
);
is_equal
$c
->perhaps_previous(
"c"
), stream(
'b'
,
'a'
);
is
$c
->maybe_prev(
"c"
),
'b'
;
is
$c
->maybe_prev(
"a"
),
undef
;
is
$c
->maybe_prev(
"xx"
),
undef
;
is
$c
->maybe_next(
"a"
),
'b'
;
is
$c
->maybe_next(
"f"
),
undef
;
DESCRIPTION
SEE ALSO
Implements: FP::Abstract::Pure
NOTE
This is alpha software! Read the status section in the package README or on the website.