Help language development. Donate to The Perl Foundation

immutable zef:lizmat last updated on 2022-12-10

d07a316392b17cf62a4be15d1a6cc7ad9bd217f4/

Actions Status

NAME

immutable - Make data structures immutable

SYNOPSIS

use immutable;

my $ima := immutable @array;
my $imh := immutable %hash;
my $ims := immutable @array, %hash;
my $imp := immutable (a => 42);

DESCRIPTION

immutable provides a single subroutine immutable that will return an immutable value-type data-structure for any data-structure given.

Inspired by a comment by Ralph Mellor on /r/rakulang.

AUTHOR

Elizabeth Mattijsen [email protected]

Source can be located at: https://github.com/lizmat/immutable . Comments and Pull Requests are welcome.

If you like this module, or what I’m doing more generally, committing to a small sponsorship would mean a great deal to me!

COPYRIGHT AND LICENSE

Copyright 2022 Elizabeth Mattijsen

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.