Skip to content

Flatten should work with deeply nested lists as well #134

Description

@rishabhdeepsingh

This can be achieved by setting a flag in the flatten extension or directly flattening the list.
Need some more discussion.

  final nestedList = [
    [
      1,
      [2, 3]
    ],
    [4, 5, 6]
  ];
  final flattened = nestedList.flatten(); // [1, 2, 3, 4, 5, 6]

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions