# Pastebin idzFo8NL class ImmutableDS { has $!last-return; has $.field-value; has $.some-field is built(:bind) is rw = Proxy.new: FETCH => -> $ { my $tmp = $!last-return; $!last-return = Nil; $tmp // $!field-value }, STORE => -> $, $field-value { $!last-return = self.new: :$field-value } ; } my ImmutableDS $immutable-data-structure .= new: :42field-value; my $new-immutable-data-structure = $immutable-data-structure.some-field = 13; say $new-immutable-data-structure.some-field; say $immutable-data-structure.some-field; $immutable-data-structure.some-field = 3.14; say $new-immutable-data-structure.some-field; say $immutable-data-structure.some-field;