 
   (fact "Forms are evaluated in correct order"
     (let [side-effect-place (atom [])]
-      (do2
+      (sut/do2
           (swap! side-effect-place conj 1)
           (swap! side-effect-place conj 2)
         (swap! side-effect-place conj 3))

                        :k-2-2-3 "v-2-2-3"}}})

    (fact
      (select-keys-recursively m [[:k-1]
                                  [:k-2 [:k-2-2
                                         [:k-2-2-1]
                                         [:k-2-2-3]]]])
      => {:k-1 "v-1"
          :k-2 {:k-2-2 {:k-2-2-1 "v-2-2-1"
                        :k-2-2-3 "v-2-2-3"}}})))

;;;; ___________________________________________________________________________
;;;; ---- indexed ----

(fact "`indexed` works"
  (indexed [:a :b :c :d])
  => [[0 :a]
      [1 :b]
      [2 :c]
      [3 :d]])

;;;; ___________________________________________________________________________
;;;; ---- position ----
;;;; ---- positions ----

(fact "`position` and `positions` work"
  (fact "`position` tests"
    (position even? []) => nil
    (position even? [12]) => 0
    (position even? [11 13 14]) => 2
    (position even? [11 13 14 14]) => 2)
  (fact "`positions` tests"
    (positions even? []) => []
    (positions even? [12]) => [0]
    (positions even? [11 13 14]) => [2]
    (positions even? [11 13 14 14 15]) => [2 3]))

;;;; ___________________________________________________________________________
;;;; ---- unchunk ----

(defn fun-with-return-args-to-even?-and-identity [fun]
  (let [clj-even?     even?

      (fact (chunked-seq? (-> my-chunked-seq rest)) => true)
      (fact (chunked-seq? (-> my-chunked-seq rest rest)) => true))
    
    (fact "`(sut/unchunk my-chunked-seq)` is not chunked"
      (fact (chunked-seq? (sut/unchunk my-chunked-seq)) => false)
      (fact (chunked-seq? (-> (sut/unchunk my-chunked-seq) rest)) => false)
      (fact (chunked-seq? (-> (sut/unchunk my-chunked-seq) rest rest)) => false))

    (fact "sut/unchunking a sequence doesn't change its value"
      (= my-chunked-seq
         (sut/unchunk my-chunked-seq))))

  (fact "A more explicit exploration of the values that are realised"
    (fact "Without `sut/unchunk`, `map` consumes elements we don't ultimately need"
      (with-return-args-to-even?-and-identity
        (every? even?
                (map identity [2 4 6 7 8 10])))
      =>
      [[2 4 6 7]
       [2 4 6 7 8 10]])
    (fact "With `sut/unchunk`, `map` only consumes elements we ultimately need"
      (with-return-args-to-even?-and-identity
        (every? even?
                (map identity
                     (sut/unchunk [2 4 6 7 8 10]))))
      =>
      [[2 4 6 7]
       [2 4 6 7]])))

;;;; ___________________________________________________________________________
;;;; ---- sut/last-index-of-char-in-string ----

(fact "`sut/last-index-of-char-in-string` works"
  (fact (sut/last-index-of-char-in-string \c "") => -1
    (sut/last-index-of-char-in-string \c "xyz") => -1
    (sut/last-index-of-char-in-string \c "c") => 0
    (sut/last-index-of-char-in-string \c "abc") => 2
    (sut/last-index-of-char-in-string \c "abcde") => 2
    (sut/last-index-of-char-in-string \c "abcce") => 3))
