I’m not certain, but think you might be describing hylomorphism:
https://medium.com/@JosephJnk/hylomorphisms-43a5494729b7

-db


On Aug 19, 2019, at 5:00 AM, haskell-cafe-request@haskell.org wrote:

Does a function of this general nature exist in some package already?