Why is a `isfoo(x) = x === foo` method defined for some singleton types?

Packages may implement dedicated filter methods for certain functions. Anonymous functions cannot be matched, but

filter(::typeof(isnothing), c::SomeCollection)
filter(::Base.Fix2{typeof(===), Missing}, c::SomeCollection)

can.

2 Likes