Use derived functor and foldable.