Skip to content

Commit

Permalink
Correct backwards definition of two-arg replace
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed May 13, 2017
1 parent 606ad5a commit bc58bb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Nulls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ xor(b::Bool, a::Null) = null
# end

replace(itr, a, b) = (ifelse(v == a, b, v) for v in itr)
replace(itr, b) = replace(itr, null, b)
replace(itr, b) = replace(itr, b, null)
skip(itr, a=null) = (v for v in itr if v != a)

end # module

0 comments on commit bc58bb7

Please sign in to comment.