Skip to content

Enumerate doesn't work with tcollect #563

@mrufsvold

Description

@mrufsvold

Enumerate doesn't increment when you use it with a tcollect

julia> a = collect(1:5);

julia> a |> Enumerate() |> collect
5-element Vector{Tuple{Int64, Int64}}:
 (1, 1)
 (2, 2)
 (3, 3)
 (4, 4)
 (5, 5)

julia> a |> Enumerate() |> tcollect
5-element Vector{Tuple{Int64, Int64}}:
 (1, 1)
 (1, 2)
 (1, 3)
 (1, 4)
 (1, 5)

If there is a technical reason that this can't work, then I think it should be documented that Enumerate doesn't work (or maybe list all the Transducers that are known to work with tcollect).

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