Ask Your Question

vinaypai's profile - activity

2020-06-15 15:36:51 -0600 commented answer Show both sides of a function definition

@rburing thank you for the detailed explanation and answer. You're right, repeating just the function name isn't too bad, so your suggestion does the trick.

2020-06-15 15:34:44 -0600 received badge  Scholar (source)
2020-06-14 04:47:31 -0600 received badge  Student (source)
2020-06-13 22:10:55 -0600 asked a question Show both sides of a function definition

When I define a function and show on it, I only get the right hand side. Is there a way to show the full definition? Basically I want to show pretty-printed version of the code used to define the function. I'm using a Jupyter notebook. I could simply rewrite it in a markdown cell of course, but that's tedious and error-prone my real use-case which is more complex than this toy example.

f(x) = a*x^2 + b*x + c
show(f)

What I get:

𝑥 ↦ 𝑎𝑥2+𝑏𝑥+𝑐

What I want:

f(𝑥) = 𝑎𝑥2+𝑏𝑥+𝑐