            segm (for [i (range start (+ start len))] (get-in b [line i]))]
        (if (<= len 1)
          (cons (get-in b [line start]) res)
-         (f b (itr line) (- len 2) (concat segm res) itr))))))
+         (middle b (itr line) (- len 2) (concat segm res) itr))))))
+
+(defn corner [b]
+  (let [n (count b)
+        r (for [i (range n) j (range i n)] (get-in b [i j]))
+        l (for [i (range n) j (range 0 (inc i))] (get-in b [i j]))]
+    (list r l)))
   
 (defn lt [b]
   (map butlast (butlast b)))

        frm (str "~" l ",'0B")]
    (mapv #(clojure.pprint/cl-format nil frm %) b)))

(defn f
  ([b] (f b inc))
  ([b itr] (filter identity (map #(f b % itr) (range (count b)))))
  ([b line itr] (f b line (count (first b)) [] itr))
  ([b line len res itr]
   (when (and (odd? (count (first b))) (>= line  0) (< line (count b)))
     (let [n (count (first b))

   (if (= (count b) 1)
     1
     (+ (mem mem (lt b)) (mem mem (rt b)) (mem mem (lb b)) (mem mem (lb b))))))

