Anonymous user
Compound data type: Difference between revisions
no edit summary
Thundergnat (talk | contribs) m (Fix Perl6 -> Raku links) |
No edit summary |
||
Line 1,141:
Point(x=3, y=4)
</pre>
=={{header|Lambdatalk}}==
<lang scheme>
1) a pair
{def P {P.new 1 2}}
-> P
{P.left {P}}
-> 1
{P.right {P}}
-> 2
2) its Lispsish variant
{def Q {cons 1 2}}
-> Q
{car {Q}}
-> 1
{cdr {Q}}
-> 2
3) as an array
{def R {A.new 1 2}}
-> R
{A.first {R}}
-> 1
{A.last {R}}
-> 2
</lang>
=={{header|Lasso}}==
|