 (defn product-fl [xs]
   (fold-left xs 1 *))
 (defn len-fl [xs]
-  (fold-left xs  0 (fn [_ x] (+ 1 x))))
+  (fold-left xs 0 (fn [_ x] (+ 1 x))))
 ;fpins
 ;All are basically same :)
 ;-----------------------------------------------------------------------

(defn my-reverse [xs]
  (fold-left xs '() cons))
(defn my-reverse2 [xs]
  (fold-right xs [] #(conj %2 %)))                           ;This is
;way to do it with fold-right as list does not support adding at the end
;fpins
;It is done via f-l as in my first attempt
;-----------------------------------------------------------------------
; case Nil => z
; case Cons (h, t) => foldLeft (t, f (z, h)) (f)
; }
; Actually - nope mine is not really equiv because below fold-r-via-fold-l-1 fails
;this should be better:
(defn fold-left-fpins [l z f]
  (let [[h & t :as original] l]
    (if (nil? original)
      z
      (fold-left-fpins t (f z h) f))))
;-----------------------------------------------------------------------

;3.11
