A Clockwork Orange
In the film: After a lifetime of ultra violence, Alex is submitted to treatment and is cured of the compulsion for violence, at the cost of his love of classical music. After trying to commit suicide, he finds that he’s been cured of his aversion, and is able to go back to his violent ways.
In the book: Most of the same events play out; the treatment, the aversion to violence and the suicide attempt, but when his depraved impulses return, Alex decides he doesn’t need them. He thinks violence is a pointless waste of time, and just wants to be a productive member of society.