;;AUTOLOAD: car
;;AUTODOC: car "traditional lisp car function: get first element of list"
;;(car list) ==> first element or ()


(defun car (l) (getn l 0))

;;AUTOLOAD: cdr
;;AUTODOC: cdr "traditional lisp cdr function: returns list without first element"
;; (cdr list) ==> list of last elements or ()
;;
;; WARNING: it does a COPY of the sublist, so (eq (cdr foo) (cdr foo)) 
;; is FALSE! So unlike car and cons, this does not emulate fully its lisp 
;; counterpart.

(defun cdr (l) (subseq l 1))

;;AUTOLOAD: cons
;;AUTODOC: cons "traditional lisp function: construct a list with head and tail"
;; Usage: (cons elt list) ==> a new list with elt as first element and
;; list as rest
;; (cons 1 '( 2 3 4)) ==> (1 2 3 4)
;; do not modify the list

(defun cons (e l)
  (+ (list e) l)
)
