Today I stumbled across the fact that the sequence operator can be chained:

> 1...5...1
(1 2 3 4 5 4 3 2 1)

You can even reduce with it:

> [...] 1, 5, 3, 10, 8
(1 2 3 4 5 4 3 4 5 6 7 8 9 10 9 8)

And even sequences with custom generators can be joined:

> 0,1,*+*...144,*/2...9
(0 1 1 2 3 5 8 13 21 34 55 89 144 72 36 18 9)

Pretty cool!  The online docs for the operator don't seem to offer even a
hint that this is possible, though.

Anyway, I was hoping that someone with more insight into the internals
could describe how this works.  Simple concatenation, or can sequences
lazily dispatch to another sequence once exhausted, or...?

Reply via email to