I'm currently working on a clisp assignment making a basic address book. However, the caveat to this assignment is I can only use cons, car, cdr, cond, if, eq, assoc and setf to complete the assignment...
I decided early on to simply implement my own list and append procedures to simplify the process, but that isn't working particularly well. Frankly, I'm lost on how to generate a non-dotted list using only the above procedures.
Here's what I'm attempting to do:
(defun create-entry (name email phone-number address)
(list (cons 'name name)
(cons 'email email)
(cons 'phone-number phone-number)
(cons 'address address)))
Obviously I can't use list here, and my only solution thus far has ben to cons name and email, cons phone-number to that and cons address to that which isn't exactly what I'm looking for.
TL;DR Is there a way to implement the list procedure using only cons, car, cdr, cond, if, eq, assoc and setf.