anchor.diff:    (COND
       ((CONSP (MEMBER Expr Locals))
        Expr)
  -    ((AND (CONSP Expr) (EQ 'type (CAR Expr)) (CONSP (CDR Expr)) (CONSP (CDDR Expr)) (NULL (CDDDR Expr)))
  -     (shen.kl-to-lisp Locals (CAR (CDR Expr))))
  -    ((AND (CONSP Expr) (EQ 'lambda (CAR Expr)) (CONSP (CDR Expr)) (CONSP (CDDR Expr)) (NULL (CDDDR Expr)))
  -     (LET ((ChX (shen.ch-T (CAR (CDR Expr)))))
  +
  +    ; Locals [type X _] -> (kl-to-lisp Locals X)
  +    ((AND
  +      (CONSP Expr)
  +      (EQ 'type (CAR Expr))
  +      (CONSP (CDR Expr))
  +      (CONSP (CDDR Expr))
  +      (NULL (CDDDR Expr)))
  +     (shen.kl-to-lisp Locals (CADR Expr)))
  +
  +    ; Locals [lambda X Y] -> (let ChX (ch-T X) (protect [FUNCTION [LAMBDA [ChX] (kl-to-lisp [ChX | Locals] (SUBST ChX X Y))]]))
  +    ((AND
  +      (CONSP Expr)
  +      (EQ 'lambda (CAR Expr))
  +      (CONSP (CDR Expr))
  +      (CONSP (CDDR Expr))
  +      (NULL (CDDDR Expr)))
  +     (LET ((ChX (shen.ch-T (CADR Expr))))
         (LIST 'FUNCTION (CONS 'LAMBDA (CONS (LIST ChX) (CONS (shen.kl-to-lisp (CONS ChX Locals) (SUBST ChX (CADR Expr) (CADDR Expr))) ()))))))
  -    ((AND (CONSP Expr) (EQ 'let (CAR Expr)) (CONSP (CDR Expr)) (CONSP (CDDR Expr)) (CONSP (CDDDR Expr)) (NULL (CDDDDR Expr)))
  +
  +    ; Locals [let X Y Z] -> (let ChX (ch-T X) (protect [LET [[ChX (kl-to-lisp Locals Y)]] (kl-to-lisp [ChX | Locals] (SUBST ChX X Z))]))
  +    ((AND
  +      (CONSP Expr)
  +      (EQ 'let (CAR Expr))
  +      (CONSP (CDR Expr))
  +      (CONSP (CDDR Expr))
  +      (CONSP (CDDDR Expr))
  +      (NULL (CDDDDR Expr)))
        (LET ((ChX (shen.ch-T (CADR Expr))))
         (LIST 'LET (LIST (LIST ChX (shen.kl-to-lisp Locals (CADDR Expr)))) (shen.kl-to-lisp (CONS ChX Locals) (SUBST ChX (CADR Expr) (CADDDR Expr))))))
  -    ((AND (CONSP Expr) (EQ 'defun (CAR Expr)) (CONSP (CDR Expr)) (CONSP (CDDR Expr)) (CONSP (CDDDR Expr)) (NULL (CDDDDR Expr)))
  +
  +    ; _ [defun F Locals Code] -> (protect [DEFUN F Locals (kl-to-lisp Locals Code)])
  +    ((AND
  +      (CONSP Expr)
  +      (EQ 'defun (CAR Expr))
  +      (CONSP (CDR Expr))
  +      (CONSP (CDDR Expr))
  +      (CONSP (CDDDR Expr))
  +      (NULL (CDDDDR Expr)))
        (LIST 'DEFUN (CADR Expr) (CADDR Expr) (shen.kl-to-lisp (CADDR Expr) (CADDDR Expr))))
  +
  +    ; Locals [cond | Cond] -> (protect [COND | (MAPCAR (/. C (cond_code Locals C)) Cond)])
       ((AND (CONSP Expr) (EQ 'cond (CAR Expr)))
        (CONS 'COND (MAPCAR (FUNCTION (LAMBDA (C) (shen.cond_code Locals C))) (CDR Expr))))
  +
  +    ; Params [F | X] ->
  +    ;   (let Arguments (protect (MAPCAR (/. Y (kl-to-lisp Params Y)) X))
  +    ;     (optimise-application
  +    ;       (cases
  +    ;         (protect (cons? (MEMBER F Params)))
  +    ;           [apply F [(protect LIST) | Arguments]]
  +    ;         (cons? F)
  +    ;           [apply (kl-to-lisp Params F) [(protect LIST) | Arguments]]
  +    ;         (partial-application? F Arguments)
  +    ;           (partially-apply F Arguments)
  +    ;         true
  +    ;           [(maplispsym F) | Arguments])))
       ((CONSP Expr)
        (LET ((Args (MAPCAR (FUNCTION (LAMBDA (Y) (shen.kl-to-lisp Locals Y))) (CDR Expr))))
         (shen.optimise-application
  
positive.code: 
  (DEFUN shen.wrap (Expr)
    (COND
     ((AND (CONSP Expr)
           (AND (EQ 'cons? (CAR Expr))
                (AND (CONSP (CDR Expr)) (NULL (CDR (CDR Expr))))))
      (CONS 'CONSP (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'string? (CAR Expr))
                (AND (CONSP (CDR Expr)) (NULL (CDR (CDR Expr))))))
      (CONS 'STRINGP (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'number? (CAR Expr))
                (AND (CONSP (CDR Expr)) (NULL (CDR (CDR Expr))))))
      (CONS 'NUMBERP (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'empty? (CAR Expr))
                (AND (CONSP (CDR Expr)) (NULL (CDR (CDR Expr))))))
      (CONS 'NULL (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'and (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (NULL (CDR (CDR (CDR Expr))))))))
      (CONS 'AND
            (CONS (shen.wrap (CAR (CDR Expr)))
                  (CONS (shen.wrap (CAR (CDR (CDR Expr)))) NIL))))
     ((AND (CONSP Expr)
           (AND (EQ 'or (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (NULL (CDR (CDR (CDR Expr))))))))
      (CONS 'OR
            (CONS (shen.wrap (CAR (CDR Expr)))
                  (CONS (shen.wrap (CAR (CDR (CDR Expr)))) NIL))))
     ((AND (CONSP Expr)
           (AND (EQ 'not (CAR Expr))
                (AND (CONSP (CDR Expr)) (NULL (CDR (CDR Expr))))))
      (CONS 'NOT (CONS (shen.wrap (CAR (CDR Expr))) NIL)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (AND (NULL (CAR (CDR (CDR Expr))))
                               (NULL (CDR (CDR (CDR Expr)))))))))
      (CONS 'NULL (CONS (CAR (CDR Expr)) NIL)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (NULL (CAR (CDR Expr)))
                          (AND (CONSP (CDR (CDR Expr)))
                               (NULL (CDR (CDR (CDR Expr)))))))))
      (CONS 'NULL (CDR (CDR Expr))))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (AND (CONSP (CAR (CDR (CDR Expr))))
                               (AND (CONSP (CDR (CAR (CDR (CDR Expr)))))
                                    (AND
                                     (NULL (CDR (CDR (CAR (CDR (CDR Expr))))))
                                     (AND (NULL (CDR (CDR (CDR Expr))))
                                          (AND
                                           (EQ
                                            (SYMBOLP
                                             (CAR (CDR (CAR (CDR (CDR Expr))))))
                                            'T)
                                           (EQ (CAR (CAR (CDR (CDR Expr))))
                                               'QUOTE))))))))))
      (CONS 'EQ (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CAR (CDR Expr)))
                          (AND (CONSP (CDR (CAR (CDR Expr))))
                               (AND (NULL (CDR (CDR (CAR (CDR Expr)))))
                                    (AND (CONSP (CDR (CDR Expr)))
                                         (AND (NULL (CDR (CDR (CDR Expr))))
                                              (AND
                                               (EQ
                                                (SYMBOLP
                                                 (CAR (CDR (CAR (CDR Expr)))))
                                                'T)
                                               (EQ (CAR (CAR (CDR Expr)))
                                                   'QUOTE))))))))))
      (CONS 'EQ (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CAR (CDR Expr)))
                          (AND (EQ 'fail (CAR (CAR (CDR Expr))))
                               (AND (NULL (CDR (CAR (CDR Expr))))
                                    (AND (CONSP (CDR (CDR Expr)))
                                         (NULL (CDR (CDR (CDR Expr)))))))))))
      (CONS 'EQ (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (AND (CONSP (CAR (CDR (CDR Expr))))
                               (AND (EQ 'fail (CAR (CAR (CDR (CDR Expr)))))
                                    (AND (NULL (CDR (CAR (CDR (CDR Expr)))))
                                         (NULL (CDR (CDR (CDR Expr)))))))))))
      (CONS 'EQ (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (AND (NULL (CDR (CDR (CDR Expr))))
                               (STRINGP (CAR (CDR Expr))))))))
      (CONS 'EQUAL (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (AND (NULL (CDR (CDR (CDR Expr))))
                               (STRINGP (CAR (CDR (CDR Expr)))))))))
      (CONS 'EQUAL (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (AND (NULL (CDR (CDR (CDR Expr))))
                               (NUMBERP (CAR (CDR (CDR Expr)))))))))
      (CONS 'IF
            (CONS (CONS 'NUMBERP (CONS (CAR (CDR Expr)) NIL))
                  (CONS (CONS '= (CDR Expr)) NIL))))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (AND (NULL (CDR (CDR (CDR Expr))))
                               (NUMBERP (CAR (CDR Expr))))))))
      (CONS 'IF
            (CONS (CONS 'NUMBERP (CDR (CDR Expr)))
                  (CONS
                   (CONS '=
                         (CONS (CAR (CDR (CDR Expr)))
                               (CONS (CAR (CDR Expr)) NIL)))
                   NIL))))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.equal? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (NULL (CDR (CDR (CDR Expr))))))))
      (CONS 'shen.ABSEQUAL (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.greater? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (NULL (CDR (CDR (CDR Expr))))))))
      (CONS '> (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.greater-than-or-equal-to? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (NULL (CDR (CDR (CDR Expr))))))))
      (CONS '>= (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.less? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (NULL (CDR (CDR (CDR Expr))))))))
      (CONS '< (CDR Expr)))
     ((AND (CONSP Expr)
           (AND (EQ 'shen.less-than-or-equal-to? (CAR Expr))
                (AND (CONSP (CDR Expr))
                     (AND (CONSP (CDR (CDR Expr)))
                          (NULL (CDR (CDR (CDR Expr))))))))
      (CONS '<= (CDR Expr)))
     (T (CONS 'shen.wrapper (CONS Expr NIL)))))
  
  (DEFUN shen.wrapper (X)
    (COND
  
negative.code:     ((EQ Symbol '-)  'shen.subtract)
      ((EQ Symbol '/)  'shen.divide)
      ((EQ Symbol '*)  'shen.multiply)
      (T               Symbol)))
  