Questions on expression testing and manipulation through pattern matching and constructing efficient patterns.
18
votes
2answers
586 views
Pattern to match a non-empty list of non-empty lists
Is there a pattern to match a list of lists, containing at least one list, with each list containing at least one element?
In the Mathematica documentation it says that the pattern
...
20
votes
2answers
300 views
How can I ensure that I am constructing patterns in the most efficient way possible?
Inspired by this answer, I am interested to know if there are best practices or rules of thumb for constructing patterns, for example for use in function definitions (...
44
votes
4answers
742 views
What best practices or performance considerations are there for choosing between Cases, Position, Pick and Select?
Cases, Select,Pick and Position each have different ...