JuliaMath / IntervalSets.jl

Interval Sets for Julia
https://juliamath.github.io/IntervalSets.jl/
Other
99 stars 26 forks source link

How to import .. #145

Closed eloualiche closed 1 year ago

eloualiche commented 1 year ago

I have a quick silly question. I cannot figure how to only import .. for a package.

Basically I have tried import IntervalSets: .. but this is not quite correct.

Thanks

hyrodium commented 1 year ago

Please try

julia> import IntervalSets:(..)

julia> ..
.. (generic function with 1 method)
hyrodium commented 1 year ago

I found official documentation about this parenthesis.

A small number of operators additionally require parentheses, e.g. Base.:(==).

https://docs.julialang.org/en/v1/manual/modules/

EDIT: this documentation is less relevant to this topic.

julia> IntervalSets.:(..)
.. (generic function with 1 method)

julia> IntervalSets.:..  # This is okay
.. (generic function with 1 method)

julia> Base.:(==)
== (generic function with 180 methods)

julia> Base.:==

ERROR: syntax: incomplete: premature end of input
Stacktrace:
 [1] top-level scope
eloualiche commented 1 year ago

Thank you. I missed this part of the documentation! This is helpful.