Macaulay2 » Documentation
Packages » Macaulay2Doc :: functionBody
next | previous | forward | backward | up | index | toc

functionBody -- get the body of a function

Synopsis

Description

The body of f is essentially just the source code of f, with no frames providing bindings for the local variables in scopes enclosing the scope of f. Function bodies cannot act as functions, but they can be tested for equality (===), and they can be used as keys in hash tables.

i1 : f = a -> b -> a+b+a*b

o1 = f

o1 : FunctionClosure
i2 : functionBody f 1

o2 = FunctionBody[currentString:1:14-1:20]

o2 : FunctionBody
i3 : f 1 === f 2

o3 = false
i4 : functionBody f 1 === functionBody f 2

o4 = true

See also

For the programmer

The object functionBody is a compiled function.