Skip to main content
5 events
when toggle format what by license comment
Feb 10 at 22:28 vote accept florin
Feb 10 at 22:17 comment added florin Both Cases[{a + b > 0, c + d == a}, _Symbol, Infinity] and Cases[{a + b > 0, c + d == a}, _Symbol, {-1}] output {a, b, c, d, a} on my 13.3 Oops, the a appears twice if I don't use also Union, or Variables, so these are necessary
Feb 10 at 19:42 comment added Goofy @florin What does Cases[{a + b > 0, c + d == a}, _Symbol, Infinity] return for you? Also Union@Cases[{a + b > 0, c + d == a}, _Symbol, {-1}] might be better than using the level spec 3 (if you want to avoid Infinity).
Feb 10 at 19:05 comment added florin This works also without Union, just Cases[list, _Symbol, [Infinity]], and also Cases[list, _Symbol, 3]
Feb 10 at 17:43 history answered mikado CC BY-SA 4.0