[next][previous][up][top][index]
search for:

method(..., SingleArgumentDispatch => ...) -- method functions with a variable number of arguments

Synopsis:

  • Usage: f = method(SingleArgumentDispatch => true)
  • Input:

  • Output:
  • f: a method function that treats several arguments as a single argument, i.e., as a sequence.
  • Here is an example.

    i1 : f = method(SingleArgumentDispatch=>true);
    i2 : f ZZ := i -> -i;
    i3 : f Sequence := S -> reverse S;
    i4 : f 44

    o4 = -44
    i5 : f(3,4,5,6)

    o5 = (6, 5, 4, 3)

    o5 : Sequence

    Normally, at most three arguments could be handled by such a method function, and the types would have to be considered separately.

    See also:

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

  • [next][previous][up][top][index]
    search for: