Road to a more functional Java with Javaslang: example refactoring
softwaremill.com