Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
O: [a: 1 b: 2] Protect 'O
只保护 O 符号而不保护 O/a。我该如何保护 O/a ?
谢谢。
好吧,您的示例实际上并未使用对象。它只是一个名为O. 所以:
O
O: reduce [a: 1 b: 2] protect [o a b] ; assuming you wanted to protect b as well
现在,如果你想要一个实际的对象,你必须这样做:
O: make object! [ a: 1 b: 2 protect [a b] ] protect 'O
R3 将提供其他一些很酷的功能PROTECT,例如PROTECT/HIDE.
PROTECT
PROTECT/HIDE