Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

As explained by Michael PilatAs explained by Michael Pilat you cannot create your own compound operators* with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to Klingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.


* Rojo demonstrated that one can create two-dimensional compound operators, meaning use of SubscriptBox, SuperscriptBox, OverscriptBox, etc. See:

As explained by Michael Pilat you cannot create your own compound operators* with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to Klingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.


* Rojo demonstrated that one can create two-dimensional compound operators, meaning use of SubscriptBox, SuperscriptBox, OverscriptBox, etc. See:

As explained by Michael Pilat you cannot create your own compound operators* with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to Klingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.


* Rojo demonstrated that one can create two-dimensional compound operators, meaning use of SubscriptBox, SuperscriptBox, OverscriptBox, etc. See:

replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

As explained by Michael Pilat you cannot create your own compound operators* with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to KlingonKlingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.


* Rojo demonstrated that one can create two-dimensional compound operators, meaning use of SubscriptBox, SuperscriptBox, OverscriptBox, etc. See:

As explained by Michael Pilat you cannot create your own compound operators* with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to Klingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.


* Rojo demonstrated that one can create two-dimensional compound operators, meaning use of SubscriptBox, SuperscriptBox, OverscriptBox, etc. See:

As explained by Michael Pilat you cannot create your own compound operators* with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to Klingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.


* Rojo demonstrated that one can create two-dimensional compound operators, meaning use of SubscriptBox, SuperscriptBox, OverscriptBox, etc. See:

added 525 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

As explained by Michael Pilat you cannot create your own compound operatorsoperators* with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to Klingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.


* Rojo demonstrated that one can create two-dimensional compound operators, meaning use of SubscriptBox, SuperscriptBox, OverscriptBox, etc. See:

As explained by Michael Pilat you cannot create your own compound operators with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to Klingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.

As explained by Michael Pilat you cannot create your own compound operators* with custom precedence. (You could conceivably write your own parser as Leonid has worked on, or attempt to coerce the Box form with CellEvaluationFunction.)

You can however use an existing operator with the desired precedence. Looking at the table Colon appears to be a good choice. The operator is entered with Esc:Esc. Example:

SetAttributes[Colon, HoldAll]
Colon[f__, x_] := Composition[f][Unevaluated@x]

ListPlot \[Colon] Flatten \[Colon] Log@N@Accumulate@# & /@ Partition[Range@300, 100]

Which appears as, and produces:

Mathematica graphics

Mathematica graphics

Since raw colon is already used for Pattern this may be confusing. However, if you are willing to edit your UnicodeFontMapping.tr file you can assign any symbol you like. Here I mapped \[Colon] to Klingon A:

Mathematica graphics

This was done by changing the line starting with 0x2236 in UnicodeFontMapping.tr.


* Rojo demonstrated that one can create two-dimensional compound operators, meaning use of SubscriptBox, SuperscriptBox, OverscriptBox, etc. See:

added 9 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
Loading
added 35 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
Loading
added 423 characters in body
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
Loading
Source Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
Loading