Chapter 11

Performing Basic I/O


Check Understanding the relationship between I/O and functional programming

Check Managing data

Check Exploring the Jupyter Notebook magic functions

Check Performing I/O-related tasks

To be useful, most applications must perform some level of Input/Output (I/O). Interaction with the world outside the application enables the application to receive data (input) and provide the results of any operations performed on that data (output). Without this interaction, the application is self-contained, and although it could conceivably perform work, that work would be useless. Any language that you use to create a useful application must support I/O. However, I/O would seem to be counter to the functional programming paradigm because most languages implement it as a procedure — a process. But functional languages implement I/O differently from other languages; they use it as a pure function. The goal is to implement I/O without side effects, not to keep I/O from occurring. The first part of this chapter discusses how I/O works in the functional programming paradigm. ...

Get Functional Programming For Dummies 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.