Anonymous user
Singly-linked list/Element insertion: Difference between revisions
Singly-linked list/Element insertion (view source)
Revision as of 21:06, 14 November 2018
, 5 years ago→{{header|Perl 6}}: comply with the task description
(→{{header|Perl 6}}: comply with the task description) |
|||
Line 1,132:
insert_after $list2->{next}, { data => 'A2a' }, { data => 'A2b' };</lang>
=={{header|Perl 6}}==
Extending <tt>class Cell</tt> from [[Singly-linked_list/Element_definition#Perl_6]]:
<lang perl6> method insert ($value) {
say @list;</lang>▼
$.next = Cell.new(:$value, :$.next)
=={{header|Phix}}==
|