anchor.diff:  ;;         (meta &form))))
   ;; )
   
  -;;hacky way to accomodate both forms...
  -;;we know we're in clojure if the args are vector
  -(defmacro deftype (&rest args)
  -   (if (vector? (nth 1 args))
  -       `(clojure-deftype ,@args)
  -       `(common-lisp::deftype ,@args)))
  -
  -;;reify is interesting.
  -;;we generate an instance of an anonymous class,
  -;;ala deftype, with protocol implementations.
  -;;TODO: look at the consequences of having bunches of
  -;;anonymous classes laying around, say evaluating
  -;;reify several times...Should we garbage collect this?
  -;;Or does that cut into dynamicity?
  -
  -(defmacro reify (&rest implementations)
  -  (let [classname (gentemp "REIFY")
  -    ctor (gensym "CONSTRUCTOR")]
  -    `(let ((,ctor (clojure-deftype ,classname ,'[] ,@implementations)))
  -       (funcall ,ctor))))
  -
  -;;;;;;;;;;;;;;;;;;;;;;;;;;; core protocols ;;;;;;;;;;;;;
  -
  -;;Need to get back to this guy...multiple arity is not yet implemented...
  -(defprotocol IFn
  -  (-invoke
  -    [this]
  -    [this a]
  -    [this a b]
  -    [this a b c]
  -    [this a b c d]
  -    [this a b c d e]
  -    [this a b c d e f]
  -    [this a b c d e f g]
  -    [this a b c d e f g h]
  -    [this a b c d e f g h i]
  -    [this a b c d e f g h i j]
  -    [this a b c d e f g h i j k]
  -    [this a b c d e f g h i j k l]
  -    [this a b c d e f g h i j k l m]
  -    [this a b c d e f g h i j k l m n]
  -    [this a b c d e f g h i j k l m n o]
  -    [this a b c d e f g h i j k l m n o p]
  -    [this a b c d e f g h i j k l m n o p q]
  -    [this a b c d e f g h i j k l m n o p q s]
  -    [this a b c d e f g h i j k l m n o p q s t]
  -    [this a b c d e f g h i j k l m n o p q s t rest]))
  -
  -
  -;;These work
  -(defprotocol ICounted
  -    (-count [coll] "constant time count"))
  -
  -(defprotocol IEmptyableCollection
  -  (-empty [coll]))
  -
  -(defprotocol ICollection
  -  (-conj [coll o]))
  -
  -(defprotocol IOrdinal
  -    (-index [coll]))
  -
  -;;this will break.  current implementation of defprotocol doesn't allow for 
  -;;multiple arity functions like this.  Need to handle variadic functions...
  -(defprotocol IIndexed
  -  (-nth [coll n] [coll n not-found]))
  -
  -(defprotocol ASeq)
  -
  -(defprotocol ISeq
  -    (-first [coll])
  -    (-rest [coll]))
  -
  -(defprotocol INext
  -  (-next [coll]))
  -
  -(defprotocol ILookup
  -  (-lookup [o k] [o k not-found]))
  -
  -(defprotocol IAssociative
  -  (-contains-key? [coll k])
  -  (-entry-at [coll k])
  -  (-assoc [coll k v]))
  -
  -(defprotocol IMap
  -  (-assoc-ex [coll k v])
  -  (-dissoc [coll k]))
  -
  -(defprotocol IMapEntry
  -  (-key [coll])
  -  (-val [coll]))
  -
  -(defprotocol ISet
  -  (-disjoin [coll v]))
  -
  -(defprotocol IStack
  -  (-peek [coll])
  -  (-pop [coll]))
  -
  -(defprotocol IVector
  -  (-assoc-n [coll n val]))
  -
  -(defprotocol IDeref
  - (-deref [o]))
  -
  -(defprotocol IDerefWithTimeout
  -  (-deref-with-timeout [o msec timeout-val]))
  -
  -(defprotocol IMeta
  -  (-meta [o]))
  -
  -(defprotocol IWithMeta
  -  (-with-meta [o meta]))
  -
  -(defprotocol IReduce
  -    (-reduce [coll f]
  -             [coll f start]))
  -
  -(defprotocol IKVReduce
  -  (-kv-reduce [coll f init]))
  -
  -(defprotocol IEquiv
  -  (-equiv [o other]))
  -
  -(defprotocol IHash
  -  (-hash [o]))
  -
  -(defprotocol ISeqable
  -  (-seq [o]))
  -
  -(defprotocol ISequential
  -  "Marker interface indicating a persistent collection of sequential items")
  -
  -(defprotocol IList
  -  "Marker interface indicating a persistent list")
  -
  -(defprotocol IRecord
  -  "Marker interface indicating a record object")
  -
  -(defprotocol IReversible
  -  (-rseq [coll]))
  -
  -(defprotocol ISorted
  -  (-sorted-seq [coll ascending?])
  -  (-sorted-seq-from [coll k ascending?])
  -  (-entry-key [coll entry])
  -  (-comparator [coll]))
  -
  -;; (defprotocol ^:deprecated IPrintable
  -;;   "Do not use this.  It is kept for backwards compatibility with existing
  -;;    user code that depends on it, but it has been superceded by IPrintWithWriter
  -;;    User code that depends on this should be changed to use -pr-writer instead."
  -;;   (-pr-seq [o opts]))
  -
  -(defprotocol IWriter
  -  (-write [writer s])
  -  (-flush [writer]))
  -
  -(defprotocol IPrintWithWriter
  -  "The old IPrintable protocol's implementation consisted of building a giant
  -   list of strings to concatenate.  This involved lots of concat calls,
  -   intermediate vectors, and lazy-seqs, and was very slow in some older JS
  -   engines.  IPrintWithWriter implements printing via the IWriter protocol, so it
  -   be implemented efficiently in terms of e.g. a StringBuffer append."
  -  (-pr-writer [o writer opts]))
  -
  -(defprotocol IPending
  -  (-realized? [d]))
  -
  -(defprotocol IWatchable
  -  (-notify-watches [this oldval newval])
  -  (-add-watch [this key f])
  -  (-remove-watch [this key]))
  -
  -(defprotocol IEditableCollection
  -  (-as-transient [coll]))
  -
  -
  -(defprotocol ITransientCollection
  -  (-conj! [tcoll val])
  -  (-persistent! [tcoll]))
  -
  -(defprotocol ITransientAssociative
  -  (-assoc! [tcoll key val]))
  -
  -(defprotocol ITransientMap
  -  (-dissoc! [tcoll key]))
  -
  -(defprotocol ITransientVector
  -  (-assoc-n! [tcoll n val])
  -  (-pop! [tcoll]))
  -
  -(defprotocol ITransientSet
  -  (-disjoin! [tcoll v]))
  -
  -(defprotocol IComparable
  -    (-compare [x y]))
  -
  -(defprotocol IChunk
  -  (-drop-first [coll]))
  -
  -(defprotocol IChunkedSeq
  -  (-chunked-first [coll])
  -  (-chunked-rest [coll]))
  -
  -(defprotocol IChunkedNext
  -  (-chunked-next [coll]))
  -
  -
  -;;Extending types to native structures and clojure literals:
  -;;==========================================================
  -
  -(extend-type
  - clclojure.pvector::pvec
  - 
  - ICounted
  - (-count [c] (vector-count c))
  - IIndexed
  - (-nth  [coll n] (nth-vec coll n))
  - (-nth  [coll n not-found] (nth-vec coll n))
  - 
  - IEmptyableCollection
  - (-empty [c] [])
  - ICollection
  - (-conj [coll itm] (vector-conj coll itm))
  - IVector
  - (-assoc-n [coll n val] (vector-assoc coll n val))
  - IStack
  - (-peek [coll]
  -        (when (not (zerop (-count coll) )) (nth-vec coll 0)))
  - (-pop  [coll]  (subvec coll 1))
  - ISeqable
  - (-seq [coll] (error 'not-implemented))
  - IHash
  - (-hash [o]   (error 'not-implemented))
  - IEquiv
  - (-equiv [o other] (error 'not-implemented))
  -
  - IKVReduce
  - (-kv-reduce [coll f init] (error 'not-implemented))
  - 
  - IReversible
  - (-rseq [coll] (error 'not-implemented))
  - IChunk
  - (-drop-first [coll] (error 'not-implemented))
  - IChunkedSeq
  - (-chunked-first [coll] (error 'not-implemented))
  - (-chunked-rest [coll] (error 'not-implemented))
  - IChunkedNext
  - (-chunked-next [coll] (error 'not-implemented)))
  - 
  -
  -
  -(extend-type  symbol 
  -    IMeta
  -    (-meta [obj] (symbol-meta obj))
  -    IWithMeta
  -    (-with-meta [obj m] (with-symbol-meta obj m) obj))
  -
  -;;subvector impls...
  -(extend-type
  - clclojure.pvector::subvector
  - 
  - ICounted
  - (-count [c] (vector-count c))
  -
  - IEmptyableCollection
  - (-empty [c] [])
  - ICollection
  - (-conj [coll itm] (vector-conj coll itm))
  - IVector
  - (-assoc-n [coll n val] (vector-assoc coll n val))
  - IStack
  - (-peek [coll]
  -        (when (not (zerop (-count coll) )) (nth-vec coll 0)))
  - (-pop  [coll]  (subvec coll 1))
  - ISeqable
  - (-seq [coll] (error 'not-implemented))
  - IHash
  - (-hash [o]   (error 'not-implemented))
  - IEquiv
  - (-equiv [o other] (error 'not-implemented))
  - IKVReduce
  - (-kv-reduce [coll f init] (error 'not-implemented))
  -
  - IReversible
  - (-rseq [coll] (error 'not-implemented))
  - IChunk
  - (-drop-first [coll] (error 'not-implemented))
  - IChunkedSeq
  - (-chunked-first [coll] (error 'not-implemented))
  - (-chunked-rest [coll] (error 'not-implemented))
  - IChunkedNext
  - (-chunked-next [coll] (error 'not-implemented))
  - )
  -
  -;;list operations.
  -(extend-type
  - cons
  - ICounted
  - (-count [c] (length c))
  -
  - IEmptyableCollection
  - (-empty [c] '())
  - ICollection
  - (-conj [coll itm] (cons itm coll))
  - IStack
  - (-peek [coll]  (first coll))
  - (-pop  [coll]  (rest coll))
  - ISeqable
  - (-seq [coll] (error 'not-implemented))
  - IHash
  - (-hash [o]   (sxhash o))
  - IEquiv
  - (-equiv [o other] (error 'not-implemented))
  - IMapEntry
  - (-key [coll] (first coll))
  - (-val [coll] (second coll))
  - )
  -
  -(extend-type
  - clclojure.cowmap::cowmap
  -
  - ICounted
  - (-count [c] (map-count c))
  -
  - IEmptyableCollection
  - (-empty [c] {})
  -
  - ICollection
  - (-conj [coll itm] (map-assoc coll (first itm) (second itm)))
  -
  - ISeqable
  - (-seq [coll] (map-seq coll))
  - 
  - IAssociative
  - (-contains-key? [coll k] (map-contains? coll k))
  - (-entry-at [coll k]      (map-entry-at coll k))
  - (-assoc [coll k v]       (map-assoc coll k v))
  -
  - IMap
  - (-assoc-ex [coll k v]  (error 'not-implemented)) ;;apparently vestigial
  - (-dissoc   [coll k]    (map-dissoc coll k))
  - 
  - IHash
  - (-hash [o]   (error 'not-implemented))
  - IEquiv
  - (-equiv [o other] (error 'not-implemented))
  - IKVReduce
  - (-kv-reduce [coll f init] (error 'not-implemented)))
  - ;; IChunk
  - ;; (-drop-first [coll] (error 'not-implemented))
  - ;; IChunkedSeq
  - ;; (-chunked-first [coll] (error 'not-implemented))
  - ;; (-chunked-rest [coll] (error 'not-implemented))
  - ;; IChunkedNext
  - ;; (-chunked-next [coll] (error 'not-implemented))
  - 
  -;;friendly map printing
  -(defmethod print-object ((obj hash-table) stream)
  -  (common-utils::print-map  obj stream))
  -
  -;;map printing compatibility
  -(defmethod print-object ((obj clclojure.cowmap::cowmap) stream)
  -  (common-utils::print-map (cowmap-table obj) stream))
  +;;conflicts with :common-lisp
  +(comment 
  + (defn nth
  +     ([coll index]
  +            (-nth coll index))
  +   ([coll index not-found]
  +          (-nth coll index not-found)))
  +
  + (defn partition [n xs]))
  +
  +;; (defn destructure [bindings]
  +;;   (let [bents (partition 2 bindings)
  +;;     pb (fn pb [bvec b v]
  +;;            (let [pvec
  +;;              (fn [bvec b val]
  +;;                  (let [gvec (gensym "vec__")
  +;;                    gseq (gensym "seq__")
  +;;                    gfirst (gensym "first__")
  +;;                    has-rest (some #{'&} b)]
  +;;                    (loop [ret (let [ret (conj bvec gvec val)]
  +;;                                 (if has-rest
  +;;                                     (conj ret gseq (list `seq gvec))
  +;;                                     ret))
  +;;                          n 0
  +;;                          bs b
  +;;                          seen-rest? false]
  +;;                          (if (seq bs)
  +;;                              (let [firstb (first bs)]
  +;;                                (cond
  +;;                                  (= firstb '&) (recur (pb ret (second bs) gseq)
  +;;                                                       n
  +;;                                                       (nnext bs)
  +;;                                                       true)
  +;;                                  (= firstb :as) (pb ret (second bs) gvec)
  +;;                                  :else (if seen-rest?
  +;;                                            (throw (new Exception "Unsupported binding form, only :as can follow & parameter"))
  +;;                                            (recur (pb (if has-rest
  +;;                                                           (conj ret
  +;;                                                                 gfirst `(first ~gseq)
  +;;                                                                 gseq `(next ~gseq))
  +;;                                                           ret)
  +;;                                                       firstb
  +;;                                                       (if has-rest
  +;;                                                           gfirst
  +;;                                                           (list `nth gvec n nil)))
  +;;                                                   (inc n)
  +;;                                                   (next bs)
  +;;                                                   seen-rest?))))
  +;;                              ret))))
  +;;              pmap
  +;;              (fn [bvec b v]
  +;;                  (let [gmap (gensym "map__")
  +;;                    gmapseq (with-meta gmap {:tag 'clojure.lang.ISeq})
  +;;                    defaults (:or b)]
  +;;                    (loop [ret (-> bvec (conj gmap) (conj v)
  +;;                                   (conj gmap) (conj `(if (seq? ~gmap) (clojure.lang.PersistentHashMap/create (seq ~gmapseq)) ~gmap))
  +;;                                   ((fn [ret]
  +;;                                        (if (:as b)
  +;;                                            (conj ret (:as b) gmap)
  +;;                                            ret))))
  +;;                          bes (let [transforms
  +;;                                (reduce1
  +;;                                 (fn [transforms mk]
  +;;                                     (if (keyword? mk)
  +;;                                         (let [mkns (namespace mk)
  +;;                                           mkn (name mk)]
  +;;                                           (cond (= mkn "keys") (assoc transforms mk #(keyword (or mkns (namespace %)) (name %)))
  +;;                                                 (= mkn "syms") (assoc transforms mk #(list `quote (symbol (or mkns (namespace %)) (name %))))
  +;;                                                 (= mkn "strs") (assoc transforms mk str)
  +;;                                                 :else transforms))
  +;;                                         transforms))
  +;;                                 {}
  +;;                                 (keys b))]
  +;;                                (reduce1
  +;;                                 (fn [bes entry]
  +;;                                     (reduce1 #(assoc %1 %2 ((val entry) %2))
  +;;                                              (dissoc bes (key entry))
  +;;                                              ((key entry) bes)))
  +;;                                 (dissoc b :as :or)
  +;;                                 transforms))]
  +;;                          (if (seq bes)
  +;;                              (let [bb (key (first bes))
  +;;                                bk (val (first bes))
  +;;                                local (if (instance? clojure.lang.Named bb) (with-meta (symbol nil (name bb)) (meta bb)) bb)
  +;;                                bv (if (contains? defaults local)
  +;;                                       (list `get gmap bk (defaults local))
  +;;                                       (list `get gmap bk))]
  +;;                                (recur (if (ident? bb)
  +;;                                           (-> ret (conj local bv))
  +;;                                           (pb ret bb bv))
  +;;                                       (next bes)))
  +;;                              ret))))]
  +;;              (cond
  +;;                (symbol? b) (-> bvec (conj b) (conj v))
  +;;                (vector? b) (pvec bvec b v)
  +;;                (map? b) (pmap bvec b v)
  +;;                :else (throw (new Exception (str "Unsupported binding form: " b))))))
  +;;     process-entry (fn [bvec b] (pb bvec (first b) (second b)))]
  +;;     (if (every? symbol? (map first bents))
  +;;         bindings
  +;;         (reduce1 process-entry [] bents))))
  
positive.code: ;;======================
  
  
  ;;need destructure...
  
  ;; "Evaluates the exprs in a lexical context in which the symbols in
  ;;   the binding-forms are bound to their respective init-exprs or parts
  ;;   therein. Acts as a recur target."
  ;; (defmacro loop (bindings &rest body)
  ;;   ;; (assert-args
  ;;   ;;  (vector? bindings) "a vector for its binding"
  ;;   ;;  (even? (count bindings)) "an even number of forms in binding vector")
  
negative.code: ;;              (loop* ~(vec (interleave gs gs))
  ;;                     (let ~(vec (interleave bs gs))
  ;;                       ~@body)))))))
  ;; (comment 
  
  ;; (defmacro fn  (& sigs) 
  