anchor.diff:               :index (types:mal-data-value index)
                :sequence sequence)))
   
  -(defun mal-first (sequence)
  +(defmal first (sequence)
     (or (first (listify (types:mal-data-value sequence))) mal-nil))
   
  -(defun mal-rest (sequence)
  +(defmal rest (sequence)
     (types:make-mal-list (rest (listify (types:mal-data-value sequence)))))
   
  -(defun mal-throw (value)
  -  (error 'types:mal-user-exception
  -         :data value))
  -
  -(defun mal-apply (fn &rest values)
  +(defmal throw (value)
  +  (error 'types:mal-user-exception :data value))
  +
  +(defmal apply (fn &rest values)
     (let ((last (listify (types:mal-data-value (car (last values)))))
           (butlast (butlast values)))
  -    (apply (types:mal-data-value fn)
  -           (append butlast last))))
  -
  -(defun mal-map (fn sequence)
  +    (apply (types:mal-data-value fn) (append butlast last))))
  +
  +(defmal map (fn sequence)
     (let ((applicants (listify (types:mal-data-value sequence))))
  -    (types:make-mal-list (mapcar (types:mal-data-value fn)
  -                                 applicants))))
  -
  -(defun mal-nil? (value)
  +    (types:make-mal-list (mapcar (types:mal-data-value fn) applicants))))
  +
  +(defmal nil? (value)
     (wrap-boolean (types:mal-nil-p value)))
   
  -(defun mal-true? (value)
  -  (wrap-boolean (and (types:mal-boolean-p value)
  -                     (types:mal-data-value value))))
  -
  -(defun mal-false? (value)
  -  (wrap-boolean (and (types:mal-boolean-p value)
  -                     (not (types:mal-data-value value)))))
  -
  -(defun mal-symbol (string)
  +(defmal true? (value)
  +  (wrap-boolean (and (types:mal-boolean-p value) (types:mal-data-value value))))
  +
  +(defmal false? (value)
  +  (wrap-boolean (and (types:mal-boolean-p value) (not (types:mal-data-value value)))))
  +
  +(defmal symbol (string)
     (types:make-mal-symbol (types:mal-data-value string)))
   
  -(defun mal-symbol? (value)
  +(defmal symbol? (value)
     (wrap-boolean (types:mal-symbol-p value)))
   
  -(defun mal-keyword (keyword)
  +(defmal keyword (keyword)
     (if (types:mal-keyword-p keyword)
         keyword
         (types:make-mal-keyword (format nil ":~a" (types:mal-data-value keyword)))))
   
  -(defun mal-keyword? (value)
  +(defmal keyword? (value)
     (wrap-boolean (types:mal-keyword-p value)))
   
  -(defun mal-vector (&rest elements)
  +(defmal vector (&rest elements)
     (types:make-mal-vector (map 'vector #'identity elements)))
   
  -(defun mal-vector? (value)
  +(defmal vector? (value)
     (wrap-boolean (types:mal-vector-p value)))
   
  -(defun mal-hash-map (&rest elements)
  +(defmal hash-map (&rest elements)
     (let ((hash-map (types:make-mal-value-hash-table)))
  -    (loop
  -       for (key value) on elements
  +   (loop for (key value) on elements
          by #'cddr
          do (setf (genhash:hashref key hash-map) value))
       (types:make-mal-hash-map hash-map)))
   
  -(defun mal-map? (value)
  +(defmal map? (value)
     (wrap-boolean (types:mal-hash-map-p value)))
   
  -(defun mal-assoc (hash-map &rest elements)
  +(defmal assoc (hash-map &rest elements)
     (let ((hash-map-value (types:mal-data-value hash-map))
           (new-hash-map (types:make-mal-value-hash-table)))
   
  
positive.code:                               strings)))
    mal-nil)
  
  (defun mal-pr-str (&rest strings)
    (types:make-mal-string (format nil
                                   "~{~a~^ ~}"
                                   (mapcar (lambda (string) (printer:pr-str string t))
                                           strings))))
  
  (defun mal-str (&rest strings)
    (types:make-mal-string (format nil
                                   "~{~a~}"
                                   (mapcar (lambda (string) (printer:pr-str string nil))
                                           strings))))
  
  (defun mal-list (&rest values)
    (make-mal-list values))
  
  (defun mal-list? (value)
    (wrap-boolean (or (types:mal-nil-p value)
                      (types:mal-list-p value))))
  
  (defun mal-empty? (value)
    (wrap-boolean (zerop (length (types:mal-data-value value)))))
  
  (defun mal-length (value)
    (types:apply-unwrapped-values 'length value))
  
  (defun mal-= (value1 value2)
    (wrap-boolean (types:mal-data-value= value1 value2)))
  
  (defun mal-< (value1 value2)
    (types:apply-unwrapped-values-prefer-bool '<
                                              value1
                                              value2))
  
  (defun mal-> (value1 value2)
    (types:apply-unwrapped-values-prefer-bool '>
                                              value1
                                              value2))
  
  (defun mal-<= (value1 value2)
    (types:apply-unwrapped-values-prefer-bool '<=
                                              value1
                                              value2))
  
  (defun mal->= (value1 value2)
    (types:apply-unwrapped-values-prefer-bool '>=
                                              value1
                                              value2))
  
  (defun mal-read-string (value)
    (reader:read-str (types:mal-data-value value)))
  
  (defun mal-slurp (filename)
    (types:apply-unwrapped-values 'read-file-string filename))
  
  (defun mal-atom (value)
    (types:make-mal-atom value))
  
  (defun mal-atom? (value)
    (wrap-boolean (types:mal-atom-p value)))
  
  (defun mal-deref (atom)
    (types:mal-data-value atom))
  
  (defun mal-reset! (atom value)
    (setf (types:mal-data-value atom) value))
  
  (defun mal-swap! (atom fn &rest args)
    (setf (types:mal-data-value atom)
          (apply (types:mal-data-value fn)
                 (append (list (types:mal-data-value atom))
                         args))))
  
  (defun mal-cons (element list)
    (types:make-mal-list (cons element (listify (types:mal-data-value list)))))
  
  (defun mal-concat (&rest lists)
    (types:make-mal-list (apply #'concatenate
                                'list
                                (mapcar #'types:mal-data-value lists))))
  
  (defun mal-nth (sequence index)
    (or (nth (types:mal-data-value index)
             (listify (types:mal-data-value sequence)))
        (error 'index-error
  
negative.code:         :types
          :reader
          :printer
          :genhash
          :alexandria)
    (:export :ns))
  
  (in-package :core)
  
  (define-condition index-error (types:mal-error)
    ((size :initarg :size :reader index-error-size)
  