<div dir="ltr"><div><div><div>To go along with Herbert Valerio Riedel's moving functions from Foldable and Traversable to Prelude, I realized that `null` and `size` make sense for all Foldables; Reid W. Barton noted that these can have optimized implementations for many containers. He also noted that scanl1 and scanr1 make sense for general Traversables. I therefore propose:<br><br></div>Add `null` and `size` to the Foldable class. Default implementations:<br><br></div><div>null = foldr (\_ _ -> False) True<br><br></div><div>size = foldl' (\acc _ -> acc+1) 0<br></div><div><br></div>Add `scanl1` and `scanr1` to the Traversable class. Default implementations are a little less simple.<br><br>David<br></div></div>