Vocabulary

math.combinatorics

Inputs

Outputs

Word description

Outputs a sequence containing all combinations of seq choosing k elements, in lexicographical order.

Examples

Definition

math.combinatorics

Inputs

seq | a sequence |

k | a non-negative integer |

Outputs

seq' | a sequence |

Word description

Outputs a sequence containing all combinations of seq choosing k elements, in lexicographical order.

Examples

USING: math.combinatorics prettyprint ;
{ "a" "b" "c" "d" } 2 all-combinations .

{ { "a" "b" } { "a" "c" } { "a" "d" } { "b" "c" } { "b" "d" } { "c" "d" } }

{ { "a" "b" } { "a" "c" } { "a" "d" } { "b" "c" } { "b" "d" } { "c" "d" } }

Definition

This documentation was generated offline from a
`load-all`

image. If you want, you can also
browse the documentation from within the UI developer tools. See
the Factor website
for more information.

Factor 0.100 x86.64 (2263, heads/master-c17b1b6507, Mar 1 2024 15:37:26)