Math::Disarrange::List - Generate all the disarrangements of a list.
use Math::Disarrange::List; disarrange {say "@_"} qw(a b c); # c a b # b c a
Generate and process all the disarrangements of a list using the standard Perl metaphor. A disarrangement is a permutation of the original list in which no element is in its original position.
disarrange() returns the number of disarrangements in both scalar and array context.
disarrange()
disarrange() is easy to use and fast. It is written in 100% Pure Perl.
Please note that the order in which the disarrangements are generated is not guaranteed, so please do not rely on it.
The disarrange() function is exported.
Standard Module::Build process for building and installing modules:
perl Build.PL ./Build ./Build test ./Build install
Or, if you're on a platform (like DOS or Windows) that doesn't require the "./" notation, you can do this:
perl Build.PL Build Build test Build install
PhilipRBrenan@appaapps.com
http://www.appappps.com
With extensive and unfailing advice from Philipp Rumpf to whom I am greatly indebted.
Copyright (c) 2009 Philip R Brenan.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
To install Math::Disarrange::List, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Disarrange::List
CPAN shell
perl -MCPAN -e shell install Math::Disarrange::List
For more information on module installation, please visit the detailed CPAN module installation guide.