[top][index]
search for:

method(..., Associative => ...) -- allows associative methods to be created

f = method(Associative=>true) -- creates an associative method which will call upon the appropriate binary methods for its arguments two at a time.

In the following example we install a method which isn't associative to illustrate the order of evaluation.

i1 : f = method(Associative => true)

o1 = f

o1 : Function
i2 : f(String,String) := (i,j) -> "(" | i | ")," | j;
i3 : f("a","b","c","d")

o3 = (((a),b),c),d

See also:

  • Default value: false -- Boolean value false
  • Function: method -- make a new method function
  • Option name: Associative

  • [top][index]
    search for: