In purescript, let's say I have a type.
newtype Person = Person {name::String,age:Int}
I want to create a function which takes this record and a string specifying the field name, e.g. name, and returns the value of that field.
My use case is that I will have a record and I want concatanation of some of those fields. I want to pass an array of strings which will be the field names, and then using fold get it done in one line. Is such a thing possible?
\p -> p.name
? – stholzm