featurehelp wanted
仓库指标
- Star
- (48,709 star)
- PR 合并指标
- (平均合并 20天 6小时) (30 天内合并 157 个 PR)
描述
It would be nice to have a single argument isa for cleaner filtering code.
filter(x -> !isa(x, AbstractFloat), [1, 2.0])
# could become
filter(!isa(AbstractFloat), [1, 2.0])
This would provide some consistency with other functions, such as isequal, but since isa is a builtin function, defining other variants doesn't seem trivial.
julia> Core.isa(::Type{T}) where {T} = (x) -> isa(x, T)
ERROR: cannot add methods to a builtin function