Description:
Expands a list following repetition patterns.
1. <number>* (x1 ...x2)
repeats the pattern x1...x2 <number> times.
2. <n>_<m>s<k>
appends an arithmetic series counting from <n> to <m> by step <k>.
s<k> can be omitted (k=1).
Ex. (expand-lst (3* (2 4) 0_8)) => (2 4 2 4 2 4 0 1 2 3 4 5 6 7 8)
Ex. (2* (a z 2* (4 12) (1_5 )) 0_16s2) => (a z 4 12 4 12 (1 2 3 4 5) a z 4 12 4 12 (1 2 3 4 5) 0 2 4 6 8 10 12 14 16)
|