Skip to main content
100%

Spark line

✓ Published0🌍 Public
FFranklin Chen
Last edited Aug 3, 2014
Created on Aug 3, 2014

This example renders a stream of numbers as a row of sparkline glyphs, using Unicode block characters whose vertical position encodes each value relative to the dataset’s minimum and maximum. Written in Haskell, it processes input from standard input or command-line arguments via `System.Environment.getArgs` and `Data.ByteString.Char8`. The `buildInOnePass` function uses a lazy circular fold over the list to compute min/max and generate UTF-8 bytes for the eight possible block levels, requiring only a single pass over the data.

AI-generated description

Similar vizzes