I was planning to utilise the state modifiers and repeat methods of ZPure to calculate a sequence of values, something like
val state = State.modify(l: Long => (l.toString, l + 1))
val result = state.repeatN(10).run(0L) // expect (List("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"), 10)
But apparently repeat always returns that latest value. Is that intentional? Or can we change repeat for produce a list, to me I thought the list is generally more useful output. You can always discard all values and keep the last from there.