Currying and uncurrying is defined between functions in $Z^{X \times Y}$ (the first set) and $\left( Z^Y \right)^X$ (the second set).
But what if $Y$ is not a constant but is dependent on $X$?
The first set would become $Z^{\sum_{i\in X}Y_i}$.
What may be a proper expressing for the second set in the case of dependent $Y$?