5 ms·
I really like F#'s approach to this let point2 = { point1 with y = value } https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/copy-and-upda
by SuddsMcDuff 7y ago
I really like F#'s approach to this
let point2 = { point1 with y = value }
https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/copy-and-update-record-expressions https://docs.microsoft.com/en-us/dotnet/fsharp/language-refe...
EDIT This is inherited from OCaml - https://v1.realworldocaml.org/v1/en/html/records.html#functional-updates https://v1.realworldocaml.org/v1/en/html/records.html#functi...