traverse record types to infer folds