Skip to Content
Learn You a Haskell for Great Good!
book

Learn You a Haskell for Great Good!

by Miran Lipovaca
April 2011
Beginner
400 pages
12h 45m
English
No Starch Press
Content preview from Learn You a Haskell for Great Good!

Chapter 9. More Input and More Output

Now that you understand the concepts behind Haskell’s I/O, we can start doing fun stuff with it. In this chapter, we’ll interact with files, make random numbers, deal with command-line arguments, and more. Stay tuned!

Files and Streams

Armed with the knowledge about how I/O actions work, we can move on to reading and writing files with Haskell. But first, let’s take a look at how we can use Haskell to easily process streams of data. A stream is a succession of pieces of data entering or exiting a program over time. For instance, when you’re inputting characters into a program via the keyboard, those characters can be thought of as a stream.

Input Redirection

Many interactive programs get the user’s input via the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective Haskell

Effective Haskell

Rebecca Skinner
Learning Go

Learning Go

Jon Bodner

Publisher Resources

ISBN: 9781457100406Errata Page