Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I nest functions?

The following code

EllipticCurve([0,1]).reduction(5).cardnality()

returns an error, while the code

e = EllipticCurve([0,1]).reduction(5)
e.cardnality()

works fine. Is there a way to do this on one line? (Note: I don't particularly care about this with elliptic curves, I'd just like to be able to do things like this in one line. In other words, I'm not looking for a mathematical answer.)

How do I nest functions?

The following code

EllipticCurve([0,1]).reduction(5).cardnality()
EllipticCurve([0,1]).reduction(5).cardinality()

returns an error, while the code

e = EllipticCurve([0,1]).reduction(5)
e.cardnality()
e.cardinality()

works fine. Is there a way to do this on one line? (Note: I don't particularly care about this with elliptic curves, I'd just like to be able to do things like this in one line. In other words, I'm not looking for a mathematical answer.)

How do I nest functions?

The following code

EllipticCurve([0,1]).reduction(5).cardinality()

returns an error, while the code

e = EllipticCurve([0,1]).reduction(5)
e.cardinality()

works fine. Is there a way to do this on one line? (Note: I don't particularly care about this with elliptic curves, I'd just like to be able to do things like this in one line. In other words, I'm not looking for a mathematical answer.)answer. Also, I'm asking for something different than, say, this

e = EllipticCurve([0,1]).reduction(5); e.cardinality()

.)