I am refreshing a bit my basic knowledge of mathematics, and I have some doubts, I am sure you can help me with.
Let's take this function in python:
def f (x): return x ** 2
I gather that this can be written as:
$$f:\Bbb R \to \Bbb R \\ x \mapsto x^2$$
Both domain and codomain of this function are $\Bbb R$.
How about this function:
def g (f, x): def h (y): return x * f (y) return h
Assuming that $f$ is a function from $\Bbb R$ to $\Bbb R$, and that both $x, y \in \Bbb R$, how do I write this python function in mathematical notation.
I think I can figure out the domain and codomain:
$$ g: \Bbb R ^ \Bbb R \times \Bbb R \to \Bbb R ^ \Bbb R\\$$
But how do you express the actual function mapping?