          [:turn {:locked false :candies candies :coins coins}]
          (machine true (dec candies) coins)))
 
+
+

  [fs]
  (fpinscala.strictness-and-laziness/fold-right             ;Notice that this variant is using fold-right
    (unit '())                                              ;Check out that "unit-produced" function is used as z value (now - it wouldn't be really
    #(map2-rng % %2 (fn [a b] (cons a b)))                 ;correct to say it is "initial" but rather neutral (or terminating?) element
    fs))
;THIS WORKS!!! - THUS IN TERMS OF FPINS (AS FAR AS I UNDERSTOOD) Z IS UNIT/NEUTRAL ELEMENT


  "FPINS variant of non-negative-int function, adapted to 'state' variant - haha - and I was thinking: Adding one is way too simple :)"
  [rng]
  (from-state (rng) :let [n nxt-rng]
              (if (< n 0)
                (make-state (- (inc n)) nxt-rng)
                (make-state n nxt-rng))))

;usage example
((state-sequence-fpins (repeat 5 non-negative-int-fpins-s)) (make-simple-rng-s 42))
