beowulf.cons-cell
The fundamental cons cell on which all Lisp structures are built. Lisp 1.5 lists do not necessarily have a sequence as their CDR, and must have both CAR and CDR mutable, so cannot be implemented on top of Clojure lists.
CAR
(CAR x)
Return the item indicated by the first pointer of a pair. NIL is treated specially: the CAR of NIL is NIL.
CDR
(CDR x)
Return the item indicated by the second pointer of a pair. NIL is treated specially: the CDR of NIL is NIL.
F
The canonical false value - different from NIL
, which is not canonically false in Lisp 1.5.
make-beowulf-list
(make-beowulf-list x)
Construct a linked list of cons cells with the same content as the sequence x
.
make-cons-cell
(make-cons-cell car cdr)
Construct a new instance of cons cell with this car
and cdr
.
MutableSequence
protocol
Like a sequence, but mutable.
members
getCar
(getCar this)
Return the first element of this sequence.
getCdr
(getCdr this)
like more
, q.v., but returns List NIL
not Clojure nil
when empty.
getUid
(getUid this)
Returns a unique identifier for this object
rplaca
(rplaca this value)
replace the first element of this sequence with this value
rplacd
(rplacd this value)
replace the rest (but-first; cdr) of this sequence with this value
pretty-print
(pretty-print cell)
(pretty-print cell width level)
This isn’t the world’s best pretty printer but it sort of works.