[top][index]
search for:

Function _ Thing -- attach the first argument to a function of two or more arguments

Synopsis:

  • Usage: g = f_x
  • Operator: _
  • Input:
  • f, an instance of class Function: a function of two or more arguments
  • x, an instance of class Thing: anything
  • Output:
  • g, an instance of class Function: a new function with the property that g(y) returns the value of f(x,y), that g(y,z) returns the value of f(x,y,z), and so on.
  • This abbreviation allows us to save a bit of typing, and in some cases, agrees with standard mathematical notation.

    i1 : R = ZZ[a .. i];
    i2 : f = genericMatrix(R,a,3,3)

    o2 = | a d g |
         | b e h |
         | c f i |

                 3       3
    o2 : Matrix R  <--- R
    i3 : exteriorPower(2,f)

    o3 = | -bd+ae -bg+ah -eg+dh |
         | -cd+af -cg+ai -fg+di |
         | -ce+bf -ch+bi -fh+ei |

                 3       3
    o3 : Matrix R  <--- R
    i4 : exteriorPower_2 f

    o4 = | -bd+ae -bg+ah -eg+dh |
         | -cd+af -cg+ai -fg+di |
         | -ce+bf -ch+bi -fh+ei |

                 3       3
    o4 : Matrix R  <--- R
    i5 : p = prepend_7

    o5 = p

    o5 : Function
    i6 : p {8,9,10}

    o6 = {7, 8, 9, 10}

    o6 : List

    See also:

  • splice -- remove subsequences
  • Code:

         -- ../../../Macaulay2/m2/classes.m2:111
         Function _ Thing := Function => (f,x) -> y -> f splice (x,y)

    [top][index]
    search for: