Add flatten function to flatten nested Maybe.
Add a sample executable.