Skip to Content
Effective Haskell
book

Effective Haskell

by Rebecca Skinner
July 2023
Intermediate to advanced
670 pages
17h 13m
English
Pragmatic Bookshelf
Content preview from Effective Haskell

Creating a Pager

A pager is a program that lets a user display text from a file one page at a time. The term “pager” isn’t used very frequently these days, but if you’ve ever used common command-line programs like less or man you’ve used a pager.

A pager is a great example of a small utility that will let you apply all of the different concepts that you’ve been learning about to build a single complete application that does something recognizable while still being small enough to start and finish as you work through this chapter.

Fundamentally, our pager needs to let us do three things:

  1. Output the contents of an ASCII or UTF8 encoded text file to the screen
  2. Scroll the output backwards and forwards one page at a time
  3. Display some metadata, like ...
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

Grokking Functional Programming

Grokking Functional Programming

Michal Plachta
Grokking Algorithms

Grokking Algorithms

Aditya Bhargava
The Rust Programming Language, 2nd Edition

The Rust Programming Language, 2nd Edition

Steve Klabnik, Carol Nichols

Publisher Resources

ISBN: 9798888650400Errata Page