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

lookup -- look up methods

Description

lookup(M,A) -- provides the unary method named M for class A. The first place to look is A#M. The search proceeds with the parent of A, and so on.

lookup(M,A,B) -- provides the binary method named M for (A,B). The first place to look is Y#(M,A,B) where Y is the younger of A and B. The search proceeds next with the parent of B, and so on.

lookup(M,A,B,C) -- provides the ternary method named M for (A,B,C). The first place to look is Y#(M,A,B,C) where Y is the youngest of A, B, and C. The search proceeds with the parent of C, and so on.

lookup(M,A,B,C,D) -- provides the quaternary method named M for (A,B,C,D). The first place to look is Y#(M,A,B,C,D) where Y is the youngest of A, B, C, and D. The search proceeds with the parent of D, and so on.

lookup x -- where x is a symbol or function, returns x.

If no method is found, then null is returned.

See also

For the programmer

The object lookup is a compiled function.