Fetching contributors…
Cannot retrieve contributors at this time
42 lines (26 sloc) 1.01 KB
# Copyright (c) 2015 Christian Jaeger,
# This is free software, offered under either the same terms as perl 5
# or the terms of the Artistic License version 2 or the terms of the
# MIT License (Expat version). See the file that came
# bundled with this file.
=head1 NAME
FP::Pure - base class for all purely functional data structure
UNIVERSAL::isa ($v, "FP::Pure") # true if $v is a purely functional DS
# but usually:
use FP::Predicates;
is_pure ($v) # true if $v is (officially) immutable, detectable from
# inheritance of FP::Pure or other means
Base class for all data structures that don't allow mutation (by
ordinary programs), i.e. are persistent (1).
(1) as in
More precisely, those objects that don't have methods that when called
make other methods non-functions.
package FP::Pure;
use strict; use warnings; use warnings FATAL => 'uninitialized';