Sparkline in unicode: Difference between revisions
Content added Content deleted
(Reverted - the import wasn't redundant :-)) |
m (→{{header|Python}}: (Added to preamble)) |
||
Line 1,649: | Line 1,649: | ||
Or, by composition of pure functions, |
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). |
|||
with type comments for the reader, rather than the compiler: |
|||
<lang python>import re |
<lang python>import re |
||