Skip to content

Commit

Permalink
Fix a bug in Eduction
Browse files Browse the repository at this point in the history
This is in preparation for manual `unwrap` in `complete`.
  • Loading branch information
tkf committed Jul 5, 2019
1 parent 6f3d0e6 commit 01fc51f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/processes.jl
Expand Up @@ -477,7 +477,7 @@ function Base.iterate(ts::Eduction, state = nothing)
result = next(ts.rf, result, input)
if isreduced(result)
rdone = true
result = complete(ts.rf, unreduced(result))
result = unreduced(result)
break
end
end
Expand Down
1 change: 1 addition & 0 deletions test/test_processes.jl
Expand Up @@ -94,6 +94,7 @@ end
@test collect(xf, xs) == 1:2:5
@test collect(eduction(xf, xs)) == 1:2:5
@test collect(Map(x -> 2x), eduction(xf, xs)) == 2(1:2:5)
@test collect(eduction(AbortIf(iseven) |> TakeLast(1), xs)) == 1:1
end

ed = eduction(xf, 1:5)
Expand Down

0 comments on commit 01fc51f

Please sign in to comment.