Skip to content

ofPermutations(List<V> list) #130

@numeralnathan

Description

@numeralnathan

StreamEx has a method called ofPermutations(int length). This creates a StreamEx<int[]>.

I would like a method ofPermutations(List list) which returns StreamEx<List>. The returned stream has all of the permutations of the given list. However, the stream has distinct Lists (i.e. list1 != list2 for any given pair of Lists).

One could implement this with a mapping function. However, this results in allocating the int[] and the List.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions