-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with EllipsisNotation #18
Comments
Yep, that seems likely to work. Note you can also dispatch on function types: julia> typeof(..)
IntervalSets.#..
julia> Base.getindex(A::AbstractArray, ::typeof(..)) = println("ellipsis")
julia> A = rand(3,3)
3×3 Array{Float64,2}:
0.102141 0.733993 0.765183
0.911817 0.185652 0.898025
0.506637 0.125062 0.478347
julia> A[..]
ellipsis Not sure if that's better, though. If you put together a PR I would merge it. |
The dependency on |
I think it would be nice to have a lightweight package struct DotDot <: Function end
const (..) = DotDot() And both IntervalSets.jl and EllipsisNotation.jl should depend on DotDots.jl package, but this approach is a kind of type piracy.. |
I was wondering if .. can be shared between EllipsisNotation and Intervalsets via call overload:
The text was updated successfully, but these errors were encountered: