I have the following data type defined as a record
data Config = Config { field1 :: String , field2 :: String , field3 :: String }
I want to iterate over all Config fields, apply some String -> String function, for example tail and get a new Config in return.
What is an idiomatic way to do this? Preferably, without heavy third-party libraries.
source share