NAME

RxPerl::Extras - original extra operators for RxPerl

SYNOPSIS

use RxPerl::Mojo qw/ ... /; # RxPerl::IOAsync and RxPerl::AnyEvent also possible
use RxPerl::Extras 'op_exhaust_map_with_latest'; # or ':all'

# (pause 5 seconds) 0, (pause 5 seconds) 2, complete
rx_timer(0, 2)->pipe(
    op_take(3),
    op_exhaust_map_with_latest(sub ($val, @) {
        return rx_of($val)->pipe( op_delay(5) );
    }),
)->subscribe($observer);

DESCRIPTION

RxPerl::Extras is a collection of original RxPerl operators not found in RxJS, which the author thinks might be useful to many.

It currently contains four pipeable operators.

EXPORTABLE FUNCTIONS

The code samples in this section assume $observer has been set to:

$observer = {
    next     => sub {say "next: ", $_[0]},
    error    => sub {say "error: ", $_[0]},
    complete => sub {say "complete"},
};

PIPEABLE OPERATORS

NOTIFICATIONS FOR NEW RELEASES

You can start receiving emails for new releases of this module, at https://perlmodules.net.

COMMUNITY CODE OF CONDUCT

RxPerl's Community Code of Conduct applies to this module too.

LICENSE

Copyright (C) 2024 Alexander Karelas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Alexander Karelas karjala@cpan.org