How to update nested Records?
Not best practice: Create an opaque type instead.
Question
How can I update a nested record field?
Answer
First get the nested record, then update it:
For function parameters we can use the keyword as
to bind fields of a record to a variable with the same name:
Further reading
📄Article: Updating nested records in Elm by Wouter In t Velt
Last updated