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
This is tedious and requires changing the code every time other fields are added or removed.
So, We propose to add a replace method to the record type.
The argument is a record containing the fields to be rewritten. If you provide a record containing a field that does not exist in self, a compilation error will occur.
Also, the replace method returns the same type of self. Therefore, all record field types given as an argument must match the field types of the original record.
The text was updated successfully, but these errors were encountered:
If you want to replace only one element in a record, you can do it like:
This is tedious and requires changing the code every time other fields are added or removed.
So, We propose to add a
replace
method to the record type.The argument is a record containing the fields to be rewritten. If you provide a record containing a field that does not exist in
self
, a compilation error will occur.Also, the
replace
method returns the same type ofself
. Therefore, all record field types given as an argument must match the field types of the original record.The text was updated successfully, but these errors were encountered: