Hannah prayed, and said: My heart exults in Yahweh; My horn is exalted in Yahweh; My mouth is enlarged over my enemies; Because I rejoice in your salvation.
"There is no rock like our God." This line indicates that Hannah was familiar with  Genesis 49:24, which records Jacob's blessing of Joseph, wherein he referred to God as the "Rock of Israel."  There are many other reflections of the Pentateuch in the books of Samuel.