Modify elements of struct without changing original inputs

There are some packages which provide a convenient API to make a copy with one field modified, eg

1 Like