Cmb: Difference between revisions

From The K Language Wiki
Content added Content deleted
(add cmb page)
 
("Better category ordering, add redirects to categories, fix pseudo-adverb categories")
 
(2 intermediate revisions by the same user not shown)
Line 25: Line 25:
2 3 4 5
2 3 4 5
</code>
</code>

[[Category:Verbs]]
[[Category:Named verbs]]
[[Category:Primitives]]

Latest revision as of 06:14, 9 July 2022

Cmb
a cmb b
Supported in K7, K9

cmb takes two numbers a and b and generates all unique combinations of elements from !b that are of length a.

If a > b, returns a list of empty arrays.

4 cmb 3
0#,Ø Ø Ø Ø
 4 cmb 6
0 1 2 3
0 1 2 4
0 1 2 5
0 1 3 4
0 1 3 5
0 1 4 5
0 2 3 4
0 2 3 5
0 2 4 5
0 3 4 5
1 2 3 4
1 2 3 5
1 2 4 5
1 3 4 5
2 3 4 5