Skip to content

2.0: Rename Iterators.repeated #53291

Open
@jariji

Description

@jariji

I find the difference between "repeat" and "repeated" hard to remember.

julia> repeat([1,2], 3)
6-element Vector{Int64}:
 1
 2
 1
 2
 1
 2

julia> collect(Iterators.repeated([1,2], 3))
3-element Vector{Vector{Int64}}:
 [1, 2]
 [1, 2]
 [1, 2]

#47354 proposed Iterators.cycle(itr, n) for the lazy version of repeat(itr, n).

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break code

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions