JanetDocsPlaygroundI'm feeling luckyGitHub sign in

seq



    macro
    boot.janet on line 570, column 1

    (seq head & body)

    Similar to loop, but accumulates the loop body into an array and
    returns that. See loop for details.


1 exampleSign in to add an example
Loading...
(seq [i :range [0 10] :when (odd? i)] (math/pow 2 i))

# => @[2 8 32 128 512]
# array with 2 to the power of all odd numbers smaller than 10
pepePlayground