In Hermann Hesse's Siddhartha, the title character Siddhartha goes on a quest to find his true self. Though it takes some time for him to realize it, his quest finally leads him to an acceptance of the samana tradition, which he actually rejected when he began the journey.
His journey with his friend Govina first leads him to live with the ascetic Samanas for three years. Samana teaches that individuals reach salvation by transforming and fully understanding their own minds. They abstained from pleasures and family life, teaching that they were distractions, and used yoga and meditation to try to transform and understand their minds. However, Siddhartha grew to disbelieve in the idea of abstaining from pleasures and decided it was time to move on in his quest to find himself.
He next journeys into the city where he meets and falls in love with the noblewoman Kamala. Kamala shows him sexual pleasure and helps him get a job with a wealthy merchant. Under the wealthy merchant, Siddhartha grows a prosperous business that allows him to afford every luxury. Hence, Siddhartha starts living a life that is the complete opposite of that taught by the Samanas. While he enjoys the lifestyle at first, he soon comes to find that the more he lives the life, the more selfish and reckless he becomes, even turning to a life of gambling. When he becomes thoroughly disgusted by his own actions, he decides to leave, not knowing that Kamala is pregnant with his son.
His journey nearly leads him to think of committing suicide, but he decides that this, too, is the wrong path. As he reflects back on his experiences, he begins to see that his experiences with the Samanas and in the city were both opposite experiences that worked together to define an understanding of good and evil, which is a classic samana teaching. He also meets river ferryman Vasudeva, who teaches him more samana teachings, such as the fact that time cannot be real if Brahmaa is to be considered the ultimate, infinite reality, Brahmaa being the god who created morality as defined in the scriptures called the Vedas. Later, when united with his son, who only wants to go back to the city, Siddhartha comes to understand the samana teaching that family is really only a distraction.
Hence, through his journey, he learns the samana teachings that salvation is achieved through bettering the mind and that the things of this world merely serve as distractions from bettering one's mind.