var arr = %w(a b c) for i in (0 .. arr.len) { say arr.combinations(i) }
[[]] [["a"], ["b"], ["c"]] [["a", "b"], ["a", "c"], ["b", "c"]] [["a", "b", "c"]]
Last updated 1 year ago