Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » debugging » functionBody
next | previous | forward | backward | up | index | toc

functionBody -- get the body of a function

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:21]

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

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

o4 = true

Menu

For the programmer

The object functionBody is a compiled function.


The source of this document is in Macaulay2Doc/ov_repl.m2:965:0.