Last active
May 10, 2018 20:17
-
-
Save hanshoglund/f4720300353fa6134eb5cfe7efffbc78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Write an interactive explorer for (potentially) infinite data structures. | |
- Several data structures can be supported, start with: | |
- Lists: `[Word8]` | |
- Rose trees: `Tree Word8` | |
- The application should present a terminal interface with the following interaction: | |
- Program status up | |
- A random infinite value of the data structure type (chosen at compile type) is generated | |
- The following loop is executed until the user presses 'q' or Ctrl-D | |
- A *subset* of the data structure is displayed, including one focused element which is highlighted | |
- The user presses one of the keys h j k or l to move focus | |
- The focus moves to an adjacent element | |
- As the focus moves, further parts of the data structure may be revealed | |
# Hints | |
- https://www.stackage.org/haddock/nightly-2018-05-10/ansi-wl-pprint-0.6.8.2/Text-PrettyPrint-ANSI-Leijen.html#v:hPutDoc | |
- `containers` package | |
- `Data.Word` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment