Skip to content

Iterators.countfrom(::Any, ::Any) doesn't exist #37462

Closed
@MarcMush

Description

@MarcMush

Is there a reason why only Iterators.countfrom(::Number, ::Number) is defined ?

I wanted to do

using Dates
Iterators.countfrom(now(), Minute(15))

I know I can do the same with Numbers but I like this syntax
It doesn't look like it would be an issue to allow it:

iterate(it::Count, state=it.start) = (state, state + it.step)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions