Reference Semantics (R6)

If a function changes the value of the original object.

f(y1)

Then the copy also get changed.

y2
## <Y>
##   Public:
##     a: 2
##     b: 2
##     clone: function (deep = FALSE)