Blocks to remove redundancy

Blocks have many complicated uses, from event-based code to multithreading. But they can also be used for very trivial tasks, such as removing redundant lines from code. Here’s a common operation for me: Split a list into sublists based on some piece of data changing within a loop. When the loop is over, dump whatever’s […]