Acme::List::CarCdr - car cdr cdaadadrdrr


  use Acme::List::CarCdr;
  my $can = Acme::List::CarCdr->new;

  $can->car(qw/cat dog fish/);  # "cat"
  $can->cdr(qw/cat dog fish/);  # "dog", "fish"
  $can->cddr(qw/cat dog fish/); # "fish"
  $can->c...r(...);             # ...

See also the t/ directory of the distribution of this module for example code.


car or cdr or caar or cadadr or so forth support for Perl.


Many. Any combination of a and 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, cat) or if the method name is too long (704 characters, again, being the maximum combination of a or d allowed, or 706 with the requisite prefix and suffix characters of c and r) or should the supplied arguments be not deep enough for the number of 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 a gets the first element of a supplied list (cat of the list cat dog fish), and d gets the remainder of the list (dog fish). Repeated a descend deeper into an again hopefully suitable data structure, while repeated d reduce how much of the given list is returned (cddr on the list cat dog fish will return just fish). Should too many d run off the end of the supplied list, a bare return call is made.


Reporting Bugs

Please report any bugs or feature requests to bug-acme-list-carcdr at, or through the web interface at

Patches might best be applied towards:

Known Issues

Things have not been tested exhaustively for correctedness.


perllol, and any number of a few documents on Lisp (or possibly Scheme).


thrig - Jeremy Mates (cpan:JMATES) <jmates at>


Copyright (C) 2015 by Jeremy Mates

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