hold x -- embeds it argument x in a list of class Holder.
It might be useful for displaying an integer in factored form, for example, because the usual algebraic operations are available for Expressions, but no simplification occurs.
i1 : (hold 2)^5 * (hold 3)^3 * (hold 5) * (hold 11)^2 |
Here is example of a little function that expresses rational numbers as Egyptian fractions using hold.
i2 : egyptian = method(); |
i3 : egyptian QQ := x -> ( |
i4 : egyptian(30/31) |
Class of returned value: Holder -- the class of all holder expressionsCode:
-- ../../../Macaulay2/m2/expressions.m2:1128 hold = x -> new Holder from {x}