Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Function » Function @@ Function
next | previous | forward | backward | up | index | toc

# Function @@ Function -- composition of functions

- Operator: @@
- Usage:
    `f @@ g`
- Inputs:
  - f, a function
  - g, a function
- Outputs:
  - a function, the composite function of f and g.

## Description

    i1 : f = i -> i+1

    o1 = f

    o1 : FunctionClosure

    i2 : g = i -> i^2

    o2 = g

    o2 : FunctionClosure

    i3 : apply(0 .. 10, f @@ g)

    o3 = (1, 2, 5, 10, 17, 26, 37, 50, 65, 82, 101)

    o3 : Sequence

    i4 : apply(0 .. 10, g @@ f)

    o4 = (1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121)

    o4 : Sequence

## Ways to use this method:

- Function @@ Function -- composition of functions

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/operators.m2:608:0.