0

Problem: split a list of ints such that the sums of the sublists are bounded (by 10)
Here's how I would solve it in python using a scan to do the conditional logic:
l = random.choices(range(5), k=30)
[2, 3, 3, 1, 4, 0, 3, 2, 0, 3, 3, 1, 2, 0, 2, 1, 2, 4, 4, 3, 1, 4, 2, 0, 3, 1, 4, 1, 0, 2]
scan_...