FP::IOStream
use FP::IOStream ':all'; # xdirectory_items, xdirectory_paths use FP::Stream; # stream_map use FP::List ':all'; # first my $paths = stream_map sub { my ($item) = @_; "$base/$item" }, xdirectory_items $base; # which is the same as: my $paths = xdirectory_paths $base; my $firstpath = first $paths; # ...
Lazy IO (well, input), by reading items lazily as stream items.
(It's arguable whether that is a good idea; Haskell uses different approaches nowadays. But it's still a nice way to do things if you're careful.)
This is alpha software! Read the status section in the package README or on the website.
To install FunctionalPerl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FunctionalPerl
CPAN shell
perl -MCPAN -e shell install FunctionalPerl
For more information on module installation, please visit the detailed CPAN module installation guide.