flow
flow copied to clipboard
Initializers should be applied gradually
When an array is an initializer, currently the entire array is serialized and sent when the initializer is applied.
However, only one element should be sent, and the next one the next time it goes idle etc.
Thus, this example:
flow = "print-sequence"
docs = "DESCRIPTION.md"
[[process]]
alias = "sequence-of-sequences"
source = "lib://flowstdlib/math/sequence"
input.start = { always = 0 }
input.step = { always = 1 }
input.limit = { once = [1, 2, 3] }
[[connection]]
from = "sequence-of-sequences/sequence"
to = "stdout"
# Print the sequence-of-sequences to stdout
[[process]]
source = "context://stdio/stdout"
produces
0
1
2
0
1
2
0
1
2
3
instead of
0
1
0
1
2
0
1
2
3