Bugfix in successor folding.
Add some functor application.
Add a test.