From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

FP::Abstract::Pure - functional purity protocol

SYNOPSIS

my $v = list(1); # or any other data structure that implements
# FP::Abstract::Pure
is $v->$_isa("FP::Abstract::Pure"), 1;
# but usually:
is_pure($v) # true if $v does (officially) not support mutation

DESCRIPTION

Base class for all data structures that don't allow mutation (by ordinary programs), i.e. are persistent.

More precisely, those objects that don't have methods that when called make other methods non-functions.

NOTE

This is alpha software! Read the status section in the package README or on the website.