Vocabulary

math.combinatorics

Inputs

Outputs

Word description

Outputs the mth lexicographical combination of seq choosing k elements.

Notes

Combinations are 0-based and a bounds error will be thrown if m is larger than seq length k nCk.

Examples

Definition

math.combinatorics

Inputs

m | a non-negative integer |

seq | a sequence |

k | a non-negative integer |

Outputs

seq' | a sequence |

Word description

Outputs the mth lexicographical combination of seq choosing k elements.

Notes

Combinations are 0-based and a bounds error will be thrown if m is larger than seq length k nCk.

Examples

USING: math.combinatorics sequences prettyprint ;
6 7 <iota> 4 combination .

{ 0 1 3 6 }

{ 0 1 3 6 }

USING: math.combinatorics prettyprint ;
0 { "a" "b" "c" "d" } 2 combination .

{ "a" "b" }

{ "a" "b" }

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.99 x86.64 (2190, heads/master-8ee571e3ab, Feb 1 2023 21:40:04)