The {sequence} tag generates values instead of reading them: a
range, a mathematical series, letters - 122 types, each iterated like any data
tag:
|
PHP |
HTML fragments/sequences_1.pad |
Result |
|---|---|---|
|
1 2 3 4 5 6 7 8 0 1 1 2 3 5 8 13 11 13 17 19 23 29 A B C D E F |
That is the smallest corner of a whole subsystem: plays that keep, remove or flag terms, stores that pass a sequence from one tag to the next, actions that transform it, and random draws with their own rules. It has an application of its own, which is its manual:
The sequence application - every type, play, action and option, demonstrated live.
A sequence is data like any other, so {chart} and {sparkline} draw it
straight away with sequence=:
|
PHP |
HTML fragments/sequences_2.pad |
Result |
|---|---|---|
|
Primes: Recamán: |
The sequence application has three pages built on that: the Gallery draws every type beside the OEIS entry its terms come from, Listen plays a sequence as notes - Recamán's is the famous one - in an audio file written into the page, and Guess shows the start of a sequence and asks for the next term.