Singly-linked list/Reversal: Difference between revisions

Line 14:
MODE STRINGLIST = STRUCT(STRING value, REF STRINGLIST next);
 
# construct a STRINGLIST wuthwith a few elmentselmeents #
STRINGLIST list := ("Big",
LOC STRINGLIST := ("fjords",
Line 22:
LOC STRINGLIST := ("nymph",NIL))))));
 
# print the list and buuildbuild the reverse list #
REF STRINGLIST node := list;
REF STRINGLIST reverse := REF STRINGLIST(NIL);
3,026

edits