Created
June 29, 2020 11:16
-
-
Save Francesco-itembase/fa3add74beb2b4e23b5e3cb14941810a to your computer and use it in GitHub Desktop.
Trivial examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Long itemId = 42L; | |
BigDecimal vatRate = BigDecimal.of(0.42); | |
// error handling is omitted for brevity | |
return fetchItem(itemId) | |
.flatmap(item -> calculateTax(item, vatRate)) | |
.flatmap(BusinessClass::writeTaxToDB); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment