We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
power
I would like to implement a power method that do the cartesian product of an iterable n times:
n
Iterum([0, 1]).power(3) /* ( (0 0 0) (1 0 0) (0 1 0) (1 1 0) (0 0 1) (1 0 1) (0 1 1) (1 1 1) ) */
This method produces the same result like:
Iterum.product([0, 1], [0, 1], [0, 1])
However, Iterum.product cannot produce a cartesian product of infinite iterables and Iterum.power can.
Iterum.product
Iterum.power
Iterum([0, 1]).power(Infinity) /* ( (0, 0, 0, 0, 0, ...) (1, 0, 0, 0, 0, ...) (0, 1, 0, 0, 0, ...) (1, 1, 0, 0, 0, ...) ... ) */
The text was updated successfully, but these errors were encountered:
add power method #12
823be96
No branches or pull requests
I would like to implement a
power
method that do the cartesian product of an iterablen
times:This method produces the same result like:
However,
Iterum.product
cannot produce a cartesian product of infinite iterables andIterum.power
can.The text was updated successfully, but these errors were encountered: