Currently foldr for ListL
is implemented with a simple foreach
loop. But that is actually equivalent to foldl
.
We change the implementation to use recursion instead of a foreach`` to achieve the correct behavior of
foldr`.
The incorrect implementation of foldr
made me to swap the order of the arguments in the ConcatenationMonoid
for ListL
. With this change, now the append
operation can become more natural preserving the order of the arguments.