Chapter 13. Functional input/output

This chapter covers

  • Applying effects safely from inside contexts
  • Adding effect application to Result and List
  • Combining effects for successes and failures
  • Reading data safely from the console, from file, or from memory, with the Reader abstraction
  • Handling input/output with the IO type

So far, you’ve learned how to write functional programs that haven’t really produced any usable results. You learned how to compose true functions to build more-powerful functions. More interestingly, you learned how to use nonfunctional operations in a safe, functional way. Nonfunctional operations are operations producing side effects, like throwing exceptions, changing the outside world, or simply depending on the ...

Get Functional Programming in Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.