Singly-linked list/Element definition: Difference between revisions

m
→‎Common Lisp: new example
m (→‎Common Lisp: new example)
Line 67:
public Link next;
}</lang>
 
=={{header|Common Lisp}}==
 
The built-in <code>cons</code> type is used to construct linked lists. Using another type would be unidiomatic and inefficient.
 
<lang lisp>(cons 1 (cons 2 (cons 3 nil)) => (1 2 3)</lang>
 
=={{header|Clean}}==