Extend the interface with a fold function (over the structure