Is there a way to derive Foldable
from Tuple
?
At least when the tuple is homogeneous?
For example let's say I have (1,2,3)
and I want to reverse
it or to transform it into [1,2,3]
and similar things.
I've tried to do something like
over each (\x -> 4 -x) (1,2,3) -- lol
but I need a sort of equivalent of fold with lens...
and actually I see that I can do
foldr1Of each (\a x -> a+x) (1,2,3)
but I would need instead
foldr1Of each (\a x -> a:x) (1,2,3)
which doesn't compile