nameChange : String -> { name : String, age : Int } -> { name : String, age : Int }
nameChange newName person =
person | name = newName
Error message:
-- UNEXPECTED SYMBOL ----
I was not expecting this vertical bar:
116| person | name = newName
^
Vertical bars should only appear in custom type declarations. Maybe you want || instead?
This custom type suggestion is misleading because in this case I'm trying to update a record.
Code:
Error message:
This custom type suggestion is misleading because in this case I'm trying to update a record.