Singly-linked list/Element definition: Difference between revisions

Added PicoLisp
(Added an ActionScript version.)
(Added PicoLisp)
Line 366:
);
$node{next} = \%bar_node; # mutable</lang>
 
=={{header|PicoLisp}}==
In PicoLisp, the singly-linked list is the most important data structure. Many
built-in functions deal with linked lists. A list consists of interconnected
"cells". Cells are also called "cons pairs", because they are constructed with
the function '[http://software-lab.de/doc/refC.html#cons cons]'.
 
Each cell consists of two parts: A CAR and a CDR. Both may contain (i.e. point
to) arbitrary data (numbers, symbols, other cells, or even to itself). In the
case of a linked list, the CDR points to the rest of the list.
 
The CAR of a cell can be manipulated with
'[http://software-lab.de/doc/refS.html#set set]'
and the CDR with '[http://software-lab.de/doc/refC.html#con con]'.
 
=={{header|Pop11}}==
Anonymous user