At 11:32 AM 01-24-2002 -0500, Dan Sugalski wrote:
>At 4:19 PM +0000 1/24/02, Dave Mitchell wrote:
>>Dan Sugalski <[EMAIL PROTECTED]> wrote:
>>>  That was my biggest objection. I like the thought of having a scheme
>>>  pair data type. The interpreter should see it, and it should be
>>>  accessed, as a restricted array, one with only two entries.
>>
>>Is this then the same datatype as a Perl6 pair (cf '=>' op in Apo 3) ??
>
>Good point. it probably is, yes. (Though there may be potential 
>differences--depends on whether the scheme pair can only have scalars on 
>each side, or should allow other things)

In scheme, at least, pairs can contain any data on either side.   The 
notation for a pair is (value . value), and standard list notation (a b c d 
e f g) is simply syntactic sugar for (a . (b . (c . (d . (e . (f . (g . 
'()))))))).  Although only the cdr of these pairs contain pairs, in a list 
like ((a a) (b b)) (also written as "((a . (a . '())) . ((b . (b  . '())) . 
'()))"), both the car and cdr of the outermost pair contain pairs.


Reply via email to