Sparkline in unicode: Difference between revisions
m
→{{header|Python}}: (Added to preamble)
(Reverted - the import wasn't redundant :-)) |
m (→{{header|Python}}: (Added to preamble)) |
||
Line 1,649:
Or, by composition of pure functions, with type comments for the reader, rather than the compiler.
To vary the approach, the block index value is derived here as an option type,
in a search over 7 zero-indexed bounds [0..6].
The index used is either just that of the first bound found to exceed the given data value,
or 7, if the search result was 'not found' (Nothing).
<lang python>import re
|