Acme-List-CarCdr
view release on metacpan or search on metacpan
lib/Acme/List/CarCdr.pm view on Meta::CPAN
=head1 METHODS
Many. Any combination of C<a> and C<d> may be used, up to the
historically appropriate limit of 704 characters, to form a means of
operating on a list, or list of lists of lists of some hopefully
appropriate depth. Should an invalid method name be specified (for
example, C<cat>) or if the method name is too long (704 characters,
again, being the maximum combination of C<a> or C<d> allowed, or 706
with the requisite prefix and suffix characters of C<c> and C<r>) or
should the supplied arguments be not deep enough for the number of C<a>
somewhere in the method name, this module will throw an exception.
For those not intimately familiar with lisp (or the IBM 704 hardware
instructions abducted by the said), moving from right to left, an C<a>
gets the first element of a supplied list (C<cat> of the list C<cat dog
fish>), and C<d> gets the remainder of the list (C<dog fish>). Repeated
C<a> descend deeper into an again hopefully suitable data structure,
while repeated C<d> reduce how much of the given list is returned
(C<cddr> on the list C<cat dog fish> will return just C<fish>). Should
too many C<d> run off the end of the supplied list, a bare C<return>
call is made.
( run in 0.225 second using v1.01-cache-2.11-cpan-496ff517765 )