Created
October 31, 2025 16:43
-
-
Save cbaragao/e3897eb47525b25f14ad279cf263b2a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (l as list, selections as list)=> | |
| let | |
| Source = | |
| List.Accumulate( | |
| selections, | |
| {}, | |
| (state,current)=> | |
| if | |
| Text.Contains(current,":") | |
| then | |
| List.Combine({state, | |
| List.Range( | |
| l, | |
| List.PositionOf(l, | |
| Text.Split( | |
| current | |
| ,":" | |
| ){0} | |
| ), List.PositionOf(l, | |
| Text.Split( | |
| current | |
| ,":" | |
| ){1} | |
| ) - List.PositionOf(l, | |
| Text.Split( | |
| current | |
| ,":" | |
| ){0} | |
| )+1 | |
| )}) else List.Combine({state,{List.Select(l, each _ = current){0}}}) | |
| ) | |
| in | |
| Source |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment