Skip to Content
Get Programming with Haskell
book

Get Programming with Haskell

by Will Kurt
March 2018
Beginner
616 pages
16h 53m
English
Manning Publications
Content preview from Get Programming with Haskell

Lesson 22. Interacting with the command line and lazy I/O

After reading lesson 22, you’ll be able to

  • Access command-line arguments
  • Use the traditional approach to interacting through I/O
  • Write I/O code using lazy evaluation to make I/O easier

Often when people first learn about I/O and Haskell, they assume that I/O is somewhat of a challenge for Haskell because Haskell is all about pure programs and I/O is anything but pure. But there’s another way to view I/O that makes it uniquely suited to Haskell, and somewhat clunky in other programming languages. Often when working with I/O in any language, we talk about I/O streams, but what is a stream? One good way to understand I/O streams is as a lazily evaluated list of characters. STDIN streams ...

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

Get Programming with Go

Get Programming with Go

Nathan Youngman, Roger Peppe
Effective Haskell

Effective Haskell

Rebecca Skinner

Publisher Resources

ISBN: 9781617293764Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link