You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: language/Records.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,12 @@ setPersonPostcode :: PostCode -> Person -> Person
73
73
setPersonPostcode pc p = p { address { postCode = pc } }
74
74
```
75
75
76
+
A record update function can also be defined by using an `_` inplace of the record to be updated like:
77
+
78
+
```purescript
79
+
_ { fieldName = newValue }
80
+
```
81
+
76
82
## Field Names
77
83
78
84
Symbols which are illegal value identifiers, such as title-cased identifiers or ones containing spaces, can be used to identify a field by enclosing it in double-quotes:
0 commit comments