Folds over the fields of a structure

Useful, for example, for iterating over the fields of a structure type in order to check the layout against an external source.