(ns rich4clojure.medium.problem-060
  (:require [hyperfiddle.rcf :refer [tests]]))

;; = Sequence Reductions =
  By 4Clojure user : 
;; Difficulty: Medium
  Tags : [ seqs core - functions ]
;; 
;; Write a function which behaves like reduce, but returns
;; each intermediate value of the reduction. Your function
  must accept either two or three arguments , and the
;; return sequence must be lazy.

(def restricted [reductions])

(def __ :tests-will-fail)

(comment
  
  )

(tests
  (take 5 (__ + (range))) := [0 1 3 6 10]
  (__ conj [1] [2 3 4]) := [[1] [1 2] [1 2 3] [1 2 3 4]]
  (last (__ * 2 [3 4 5])) := (reduce * 2 [3 4 5]) 120)

;; Share your solution, and/or check how others did it:
;; 
 = Sequence Reductions =
 Difficulty: Medium
 
 Write a function which behaves like reduce, but returns
 each intermediate value of the reduction. Your function
 return sequence must be lazy.
 Share your solution, and/or check how others did it:
 
(ns rich4clojure.medium.problem-060
  (:require [hyperfiddle.rcf :refer [tests]]))

  By 4Clojure user : 
  Tags : [ seqs core - functions ]
  must accept either two or three arguments , and the

(def restricted [reductions])

(def __ :tests-will-fail)

(comment
  
  )

(tests
  (take 5 (__ + (range))) := [0 1 3 6 10]
  (__ conj [1] [2 3 4]) := [[1] [1 2] [1 2 3] [1 2 3 4]]
  (last (__ * 2 [3 4 5])) := (reduce * 2 [3 4 5]) 120)
