Gist 10da47bd381918d303c5db903afe5886
This example demonstrates how to generate all non-empty combinations of a set of strings using bitmask arithmetic. It shows three separate Power Query (M) implementations, each taking a hardcoded list like {"B", "F", "T"} and producing every possible subset as concatenated text. The primary approach uses `Number.BitwiseAnd` and `Number.Power` to iterate through binary masks, while `List.Transform`, `List.Select`, and `List.Positions` filter and combine elements. A recursive alternative using `@fnCombinations` is also included. The visualizations highlight different algorithmic strategies—iterative bitwise versus recursive decomposition—for the same combinatorial output, with no external libraries beyond Power Query’s built-in list functions.
AI-generated description