Damian == Damian Conway [EMAIL PROTECTED] writes:
Too much typing:
Damian module PAIR;
Damian method car { return .key }
Damian method cdr { return .value }
Damian method AUTOVIVIFY (default, $name) {
Damian if ($name =~ m/^c([ad])([ad]*)r$/) {
Can I get a .car and a .cdr please? In my limited mind key and value
are specific to hashes and their wimpy brother associative lists.
-sam
Can I get a what what?
Can I get a .car and a .cdr please? In my limited mind key and value
are specific to hashes and their wimpy brother associative lists.
Sure. Roll-you-own with:
module PAIR;
method car { return .key }
method cdr { return .value }
or, if you're really