Skip to content

Strange behavior with Seq range, reverse #1730

Closed
@algoshipda

Description

@algoshipda

What happened

Seq([1, 2, 3]).zip(Range())
  .reverse()
// expected: [[3, 2], [2, 1], [1, 0]]
// actual: [[3, Infinity], [2, Infinity], [1, Infinity]]

and run this code below with https://clojurescript.io/

(reverse (map vector [1 2 3] (range)))
; produce ([3 2] [2 1] [1 0])

I think those codes are equivalent and Clojure's output is correct output.
Is this desired behavior?

Immutablejs Version: 4.0.0-rc.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions