Singly-linked list/Element definition: Difference between revisions

Content deleted Content added
m Added to <20 category
Line 104: Line 104:


Due to Forth's lack of typechecking, 'b' in the above examples does not have to be an actual cell, but can instead be the head pointer of the list.
Due to Forth's lack of typechecking, 'b' in the above examples does not have to be an actual cell, but can instead be the head pointer of the list.

=={{header|Fortran}}==
In ISO Fortran 95 or later:
TYPE node
REAL :: data
TYPE( node ), pointer :: next => null()
END TYPE node
!
!. . . .
!
TYPE( node ) :: head


=={{header|Haskell}}==
=={{header|Haskell}}==