Another interpretation of "He sent out His arrows and scattered them" (Psalms 18:15): His arrows would scatter the enemy, and His lightning bolts would herd them together. "And He discomfited them" (vayehummem) means He confounded them, He mixed them up; He took away their battle-standards so that they no longer knew what they were doing. Another interpretation of "And He discomfited them": the word hamamah signifies nothing other than plague, in the sense of what is said, "And He shall discomfit them with a great discomfiture" (Deuteronomy 7:23).
Arrows Scattered and Lightning Gathered to Rout the Foe
Yalkut Shimoni on Torah 232:3
דָּבָר אַחֵר, "וַיִּשְׁלַח חִצָּיו וַיְּפִיצֵם" שֶׁהָיוּ חִצָּיו מְפַזְּרָן וּבְרָקִים מְכַנְּסָן, "וַיְהֻמֵּם", הֲמָמָם, עִרְבְּבָם, נָטַל סִגָּנִיּוֹת שֶׁלָּהֶן וְלֹא הָיוּ יוֹדְעִין מַה הֵם עוֹשִׂין, דָּבָר אַחֵר, "וַיְהֻמֵּם", אֵין הֲמָמָה אֶלָּא מַגֵּפָה, כְּעִנְיָן שֶׁנֶּאֱמַר "וְהָמָם מְהוּמָה גְדֹלָה".