Suppose I have a decimal*decimal list
let tup = [(1M, 2M); (2M, 3M); (3M, 3M); (4M, 5M); (5M, 6M); (7M, 6M); (8M, 9M); (10M, 9M)]
I need a function that can group all the values together if they can be related, like
map[(100, [1M; 2M; 3M]); (101, [4M; 5M; 6M; 7M]); (102, [8M; 9M; 10M])]
I can't just do List.groupBy because it skips anything else that might be linked down the line with another decimal value. The int values on the map are arbitrary. I would like to be able to “sow” the initial value, and then increase each correction by a certain value.
What does a function look like that can do this?
f #
Steven
source share