Skip to content

Commit

Permalink
Implemented additional _missing methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBillson committed Aug 29, 2023
1 parent b8d7b0c commit 05bd274
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/skipmissing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ function Base.iterate(itr::SkipMissingVal, state...)
item, state
end

_missing(x, itr) = ismissing(x) || x == missingval(itr) # mind the order, as comparison with missing returns missing
_missing(x, itr) = x == missingval(itr)

_missing(x::Missing, itr) = true

_missing(x::Nothing, itr) = true

function _missing(x::AbstractFloat, itr)
if isnothing(missingval(itr))
return false
Expand Down

0 comments on commit 05bd274

Please sign in to comment.