anchor.diff:  ;; setf expanders
   ;; rotatef
   ;; shiftf
  +;; decode-float
  +;; float-precision
  +;; integer-decode-float
   
   
   ;; ## Crazy Town
  +;; every
  +;; notany
  +;; notevery
  +;; some
  +;; constantly
   ;; copy-seq
   ;; make-sequence
   ;; subseq
  
positive.code:   (if (numberp p)
        `(double ,x)
        `(progn ,p (double ,x))))
  
  
  (macrolet ((define-type-pred (func-name &rest v-types)
               `(progn
                  (v-def-glsl-template-fun ,func-name (x) "<invalid>" (v-type)
                                           v-bool :pure t)
                  (v-define-compiler-macro ,func-name ((x v-type)
                                                       &environment env)
                    (let ((type (varjo:argument-type 'x env)))
                      (list 'progn
                            x
                            (or ,@(loop :for v-type :in v-types :collect
                                     `(v-typep type ',v-type)))))))))
    (define-type-pred arrayp v-array)
    (define-type-pred simple-vector-p v-array)
    (define-type-pred vectorp v-array)
    (define-type-pred functionp v-function-type)
    (define-type-pred complexp v-complex)
    (define-type-pred numberp v-number)
    (define-type-pred realp v-real)
    (define-type-pred floatp v-float v-double)
    (define-type-pred integerp v-integer)
    (define-type-pred rationalp v-rational))
  
  
  (v-def-glsl-template-fun simple-bit-vector-p (a) "false" (v-type) v-bool)
  (v-def-glsl-template-fun random-state-p (a) "false" (v-type) v-bool)
  
  
  
  ;; Could use v-integer for both of these when we add that
  
negative.code: 
  ;;------------------------------------------------------------
  
  (defmacro define-type-pred (func-name func-arg pred-func args
                              &optional (then t) (else nil))
    (destructuring-bind (arg-name arg-type) func-arg
      (let ((args (or (uiop:ensure-list args)
                      '(nil))))
        `(progn
           (v-def-glsl-template-fun ,func-name (,arg-name) "<invalid>"
                                    (,arg-type)
                                    v-bool :pure t)
           (v-define-compiler-macro ,func-name (,func-arg
                                                &environment env)
             (declare (ignorable ,arg-name))
             ,(if (equal then else)
                  then
                  `(let ((type (varjo:argument-type ',arg-name env)))
                     (list 'progn
                           ,arg-name
                           (if (or ,@(loop :for arg :in args :collect
                                        `(,pred-func type ',arg)))
                               ,then
                               ,else)))))))))
  
  (define-type-pred arrayp (x v-type) v-typep v-array)
  (define-type-pred simple-vector-p (x v-type) v-typep v-array)
  (define-type-pred vectorp (x v-type) v-typep v-array)
  (define-type-pred functionp (x v-type) v-typep v-function-type)
  (define-type-pred complexp (x v-type) v-typep v-complex)
  (define-type-pred numberp (x v-type) v-typep v-number)
  (define-type-pred realp (x v-type) v-typep v-real)
  (define-type-pred floatp (x v-type) v-typep (v-float v-double))
  (define-type-pred integerp (x v-type) v-typep v-integer)
  (define-type-pred rationalp (x v-type) v-typep v-rational)
  (define-type-pred symbolp (x v-type) typep nil)
  (define-type-pred keywordp (x v-type) typep nil)
  (define-type-pred simple-bit-vector-p (x v-type) typep nil)
  (define-type-pred random-state-p (x v-type) typep nil)
  (define-type-pred vectorp (x v-type) v-typep v-vector)
  (define-type-pred adjustable-array-p (x v-array) nil nil nil nil)
  (define-type-pred array-has-fill-pointer-p (x v-array) nil nil nil nil)
  (define-type-pred bit-vector-p (x v-array) nil nil nil nil)
  (define-type-pred array-rank (x v-array) nil nil 1 1)
  (define-type-pred compiled-function-p (x v-function-type) nil nil t t)
  
  (v-def-glsl-template-fun array-row-major-index (a i) "~a" (v-array v-int) v-int)
  
  ;;------------------------------------------------------------
  
  (v-def-glsl-template-fun 1+ (a) "(~a + 1)" (v-real) 0 :pure t)
  (v-def-glsl-template-fun 1+ (a) "(~a + 1)" (v-vector) 0 :pure t)
  