JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

each

core-api


    macro
    boot.janet on line 630, column 1

    (each binding x & body)

    Loop over each value in `x` with each value of `x` bound to 
    `binding` with destructuring support. Returns `nil`.

    `x` can be a bytes, indexed, dictionary, fiber, or abstract type 
    with suitable `get` and `next` methods.


See also:eachkeachp1 exampleSign in to add an example
Loading...
(each item [1 2 3 4] (print item))
# prints 1
# prints 2
# prints 3
# prints 4
# => nil
pepePlayground