If $\displaystyle f: X \rightarrow Y$ is a map and if $\displaystyle g$ and $\displaystyle h$ are paths in $\displaystyle X$ with $\displaystyle g(1)=g(0)$, then $\displaystyle f(g \cdot h)=fg \cdot fh$.

I was told that this follows directly from the definition of path composition. This is where $\displaystyle f:X \rightarrow Y$ so the first is a path in $\displaystyle Y$ and the second is a path in $\displaystyle Y$. Is this completely justified by this, or do I need to justify this more than what is above?