Skip to content

takeLast(0) should return an empty collection #1245

Closed

Description

@jmzhang

Calling takeLast(0) on a collection should return an empty collection, rather than a full copy of the collection, as given in the implementation here https://github.com/facebook/immutable-js/blob/master/src/CollectionImpl.js#L511

Activity

  1. leebyron commented on Sep 29, 2017

    @leebyron
    Collaborator

    Good ol' -0. Thanks for the report!

  2. added a commit that references this issue on Feb 22, 2026
    e689900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions