[Solved] How to create a function that counts the number of twos in a list? [closed]
This function M will count groups of a value. It outputs a list of group occurrences in this format: [index of group, length of group]. It uses a flag m to keep track of in/out of group. If it’s out, it starts a new group occurrence, if it’s in, it increments the group length. It … Read more