flow = "candidates" [[input]] name = "limit" type = "number" [[output]] name = "candidates" type = "array/number" ####### All numbers - Sequence # Generate the sequence of numbers from 1..limit of possible primes [[process]] source = "lib://flowstdlib/math/sequence" input.start = {once = 1} input.step = {once = 1} [[connection]] from = "input/limit" to = "sequence/limit" ######### All numbers - gather into an array [[process]] source = "lib://flowstdlib/data/accumulate" input.partial = {once = []} [[connection]] from = "sequence/sequence" to = "accumulate/values" [[connection]] from = "input/limit" to = "accumulate/chunk_size" [[connection]] # loop-back from = "accumulate/chunk_size" to = "accumulate/chunk_size" [[connection]] # loop-back from = "accumulate/partial" to = "accumulate/partial" # Output the gathered array on the "candidates" output [[connection]] from = "accumulate/chunk" to = "output/candidates"