Update example.md

--update example.md to show how to construct a names stack iteratively