beowulf.host
provides Lisp 1.5 functions which can’t be (or can’t efficiently be) implemented in Lisp 1.5, which therefore need to be implemented in the host language, in this case Clojure.
PLUS2
(PLUS2 x y)
Lisp 1.5 PLUS
is varargs, and implementing varargs functions in Clojure is not an added complexity I want. So this is a two arg PLUS
, on which a varargs PLUS
can be built in the Lisp 1.5 layer using REDUCE
.
QUOTIENT
(QUOTIENT x y)
I’m not certain from the documentation whether Lisp 1.5 QUOTIENT
returned the integer part of the quotient, or a realnum representing the whole quotient. I am for now implementing the latter.
RPLACA
(RPLACA cell value)
Replace the CAR pointer of this cell
with this value
. Dangerous, should really not exist, but does in Lisp 1.5 (and was important for some performance hacks in early Lisps)
RPLACD
(RPLACD cell value)
Replace the CDR pointer of this cell
with this value
. Dangerous, should really not exist, but does in Lisp 1.5 (and was important for some performance hacks in early Lisps)