SetReplace
SetReplace copied to clipboard
Fail when starting from an empty state in one of the multi-rules
The following fails with messages:
In[] := SetReplace[{}, ToPatternRules[{{1} -> {}, {} -> {}}]]

Version (please complete the following information):
- OS: macOS 10.15.1 (19B88)
- Wolfram Language Version: "12.1.0 for Mac OS X x86 (64-bit) (November 6, 2019)"
- SetReplace git sha: cb1a2de482afaa1b05ebe2c48bb00d318751f562
In:
In[] := SetReplace[{}, ToPatternRules[{{1} -> {}, {} -> {}}]]
Is it intended that two events occur? {{{1, {} -> {}, 1}, {2, {} -> {}, 1}}}
When the input is just:
In[] := SetReplace[{}, ToPatternRules[{{} -> {}}]]
the only event that occurs is {{{1, {} -> {}, 1}}}

No, SetReplace should do one event at a time, i.e., it's equivalent to <|"MaxEvents" -> 1|> (without the third argument).