Singly-linked list/Element insertion: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (→{{header|Perl 6}}: Re-added removrd language tags. Re-marked as incorrect) |
|||
Line 1,132: | Line 1,132: | ||
insert_after $list2->{next}, { data => 'A2a' }, { data => 'A2b' };</lang> |
insert_after $list2->{next}, { data => 'A2a' }, { data => 'A2b' };</lang> |
||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
{{incorrect|Perl 6|This is an array, not a singly linked list. It isn't even attempting to emulate a singly linked list.}} |
|||
my @list = <a b>; |
<lang perl6>my @list = <a b>; |
||
say @list.splice(1,0,'c'); |
say @list.splice(1,0,'c'); |
||
say @list; |
say @list;</lang> |
||
=={{header|Phix}}== |
=={{header|Phix}}== |