Re: Are .key and .value right for Pairs?

2001-10-06 Thread Randal L. Schwartz
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$/) {

Are .key and .value right for Pairs?

2001-10-05 Thread Sam Tregar
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?

Re: Are .key and .value right for Pairs?

2001-10-05 Thread Damian Conway
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