Skip to content
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

Preserve type in first for OneTo #56263

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Preserve type in first for OneTo #56263

wants to merge 2 commits into from

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Oct 21, 2024

With this PR,

julia> first(Base.OneTo(10), 4)
Base.OneTo(4)

Previously, this would have used indexing to return a UnitRange. This is probably the only way to slice a Base.OneTo and obtain a Base.OneTo back.

@jishnub jishnub added the ranges Everything AbstractRange label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ranges Everything AbstractRange
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants