<div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Aug 7, 2019, 8:22 AM Juan Casanova <<a href="mailto:juan.casanova@ed.ac.uk">juan.casanova@ed.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">List is special as a foldable because it is general. In <br>
other words, the function:<br>
<br>
tolist :: Foldable t => t a -> [a]<br>
tolist = foldr (:) []<br>
<br>
is such that for any x :: t a where Foldable t, it is true that<br>
<br>
foldr f v x = foldr f v (tolist x)<br>
<br>
which is to say, any structure a foldable may have is preserved when <br>
transforming into list shape, as a foldable.<br></blockquote></div><div dir="auto"><br></div><div dir="auto">This is true. In fact "Listable" might have been a better name than Foldable. (In particular Foldable has nothing to do with generic folds aka catamorphisms.)</div><div dir="auto"><br></div><div dir="auto">-Brent</div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>