Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

OrderlessPatternSequence

OrderlessPatternSequence[p1,p2,]
is a pattern object that represents a sequence of arguments matching p1,p2, in any order.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Match elements of a list in any order:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Match function arguments in any order:

In[1]:=
Click for copyable input
Out[1]=

The ordering of matched expressions is preserved:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2015
(10.1)