background-image: url(../img/fp-tower/website-background.svg) class: center, middle, white .title[Chapter 4: Conclusion] --- # Scala Functional Subset .forty-seven-left[ ## FP Functions: ## • Total ## • Deterministic ## • Pure or without actions ] .forty-seven-left[ ## General JVM recommendations: ## • Ignore null ## • Ignore runtime reflection ] --- # Benefits of FP
## 1. Refactoring, faster to develop features ## 2. Clear dependencies, easy to test ## 3. Clear effects, easy to build --- # Honest functions
.forty-seven-left[ ```scala def createInvoice( order : Order, customer: Customer ): (Invoice, InvoiceNumber) ``` ] ---
.sixty-seven-left.center[ # One small inconvenience,
... ] ---
.sixty-seven-left.center[ # One small inconvenience,
we can't do anything ] --- # Coming next
## Chapter 5: Actions ## Chapter 6: Error handling