On Sun, 04 Jun 2017 07:12:25 -0700, c...@zoffix.com wrote: > %goods here works as expected: > > <Zoffix__> m: my %goods is SetHash; react whenever Supply.interval(.3) > { $++ > 3 and done; dd %goods; %goods<foo>++; } > <camelia> rakudo-moar 3755c0: OUTPUT: > «SetHash.new()SetHash.new("foo")SetHash.new("foo")SetHash.new("foo")» > > On second iteration ends up being a type object: > > <Zoffix__> m: react whenever Supply.interval(.3) { state %goods is > SetHash; $++ > 3 and done; dd %goods; %goods<foo>++; } > <camelia> rakudo-moar 3755c0: OUTPUT: «SetHash.new()SetHashTried to > get the result of a broken Promise in block <unit> at <tmp> line > 1Original exception: Cannot modify an immutable SetHash > ((SetHash)) in block at <tmp> line 1»
Another case: ``` <Zoffix_> m: <a b c>.grep: { (state %code-files is SetHash = <foo bar>); LEAVE dd %code-files; } <camelia> rakudo-moar dd2c90192: OUTPUT: «SetHash.new("foo","bar")SetHashSetHash» ```