Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Check if all elements of a list are the same as a value
ResourceFunction["AllSameAs"][list,val] yields True if all elements of list are identical to val. |
Check if all elements match a value:
In[1]:= |
Out[1]= |
If any values do not match, AllSameAs gives False:
In[2]:= |
Out[2]= |
Patterns are not supported:
In[3]:= |
Out[3]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License