The State Changers meeting focused on the challenge of processing financial information based on fiscal years and periods. The discussion was centered around ways to divide cashflow data by the count of fiscal years in an array, where each fiscal year had multiple UUIDs, each representing a period within the fiscal year.
One state changer, Camir, had taken the approach of assigning a fiscal year for every period using map function. Then, he was trying to divide the cash flow value by the count of fiscal years existing in the array, having difficulty articulating his end goal.
Another participant helped clarify that Camir's goal was to divide the cash flow value by the number of periods within a fiscal year, not by the count of fiscal years. To achieve this, it was suggested to use a two-step process: a filter (find all elements) function to find all periods that match a given fiscal year, then a count function to determine the count of these periods.
However, the suggestion was made to use a filter-reduce pattern, instead of a map function for the divisor. A map function would transform a list into another list, whereas a reduction using count would convert the list into a single numerical value, which is the desired outcome in this case.
(Source: Office Hours 8/23/2023 )