 	argmap `(hash-map ~@first-kvs)]
     `(merge-with conj ~hashmap ~argmap)))
 
-(defn- all-expected-variants [expected]
+(defn- all-expected-permutations [expected]
   (cond (not-any? extended-fn? expected)
 	[expected]
 

  [actual expected & kind]
  (let [starting-candidate  {:actual-found [], :expected-found [],
			     :expected-skipped-over [], :expected expected }
	starting-expected-variants (all-expected-variants expected)
	gaps-ok? (some #{:gaps-ok} kind)]
    (println :in-any-order gaps-ok?)
    (loop [walking-actual   actual
	   walking-expected (first starting-expected-variants)
	   expected-variants starting-expected-variants
	   best-so-far      starting-candidate
	   candidate        starting-candidate]


	    ;; window good so far, keep working on it
	    (recur (rest walking-actual)
		   (concat (:expected-skipped-over candidate) (rest walking-expected))
		   expected-permutations
		   best-so-far
		   (tack-on-to candidate
			       :actual-found (first walking-actual)
			       :expected-found (first walking-expected)))

	    (not (empty? (rest walking-expected)))
	    ;; Perhaps another value in the current expected permutation will work.
	    ;; We can, after all, be in any order.
	    (recur walking-actual
		   (rest walking-expected)
		   expected-permutations
		   best-so-far
		   (tack-on-to candidate
			       :expected-skipped-over (first walking-expected)))

	    (not (empty? (rest walking-actual)))
	    ;; OK, there's no match for this actual element in the whole expected.
	    (if gaps-ok?
	      ;; Since gaps are OK, we can drop the bad actual element and look for next one.
	      (recur (rest walking-actual)
		     (first expected-permutations)
		     expected-permutations
		     (better-of candidate best-so-far)
		     candidate)

	      ;; Start again with a new actual: the tail of what we started with.
	      (recur (rest (concat (:actual-found candidate) walking-actual))
		   (first expected-permutations)
		   expected-permutations
		   (better-of candidate best-so-far)
                   starting-candidate))
	    
	    (not (empty? (rest expected-permutations)))
	    ;; No more actual elements, and we still have no match. So try a
	    ;; different permutation of the expected list. (This is required
	    ;; because of matching functions.
            (recur actual
                   (second expected-permutations)
		   (rest expected-permutations)
		   (better-of candidate best-so-far)
                   starting-candidate)

	    :else ; no permutation left, no smaller actuals to try. give up.
	    (better-of candidate best-so-far)))))

(defmethod seq-comparison :strict-order
  [actual expected & kind]
