“顶针” is a kind of phenomenon in ancient chinese language, meaning that "顶针" exists in 古诗词、文言文 and 对联.
its definition: if the last character / word in a sentence and the first character / word in the next sentence are the same, we call it "顶针".
In your example, ×××山,山××云,云×××;×××树,树××雨,雨×××. According to the definition, this is obviously “顶针”.
Another example:
in 《木兰诗》, there is a sentence: 归来见天子,天子坐明堂。 ---- ***天子,天子***.
This is 顶针 too.