Singly-linked list/Element definition: Difference between revisions

m
(→‎{{header|Perl 6}}: mention pitfalls of Pair, and show custom type example)
Line 344:
<lang elena>class Link
{
T<prop int> prop Item :: _item.;
T<prop Link> prop Next :: _next.;
constructor new(int item, Link next)
[{
_itemItem := item.;
_nextNext := next.
]}
}</lang>
 
Anonymous user