On Fri, Aug 05, 2005 at 11:36:16 -0700, Larry Wall wrote: > There's something to be said for having a way of indexing into that > using numeric subscripts. Certainly Lisp's extensible car/cdr notation > is the wrong way to do it, but cdddr is certainly shorter than > > $pair.value.value.value > > But maybe that's worth being dehuffmanized like that...
Haskell has !! : sub infix:<!!> (Pair $x, 0) { $x.key } sub infix:<!!> (Pair $x, Int $index) { $x.value !! ($index - 1) } -- () Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker & /\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgpMrMvGz2R03.pgp
Description: PGP signature