Well, your example doesn't actually use an object. This is just a block called O. So:
O: reduce [a: 1 b: 2]
protect [o a b] ; assuming you wanted to protect b as well
Now, if you want to create a real object, you should do it like this:
O: make object! [
a: 1
b: 2
protect [a b]
]
protect 'O
R3 will have additional interesting things that you can do with PROTECT, for example PROTECT/HIDE.
source
share