Flattening Nested Arrays in FP Style - Effect Community