Open dimchee opened 1 year ago
I tried using TakeWhile after Iterated, but Iterated function argument seems to be executed before condition of TakeWhile. Is this intentional?
julia> 1:10 |> Iterated(x -> (println("called with: $x"); x+1), 0) |> TakeWhile(x -> x < 3) |> collect called with: 0 called with: 1 called with: 2 called with: 3 3-element Vector{Int64}: 0 1 2
I tried using TakeWhile after Iterated, but Iterated function argument seems to be executed before condition of TakeWhile. Is this intentional?