JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

eachp

core-api


    macro
    boot.janet on line 619, column 1

    (eachp binding x & body)

    Loop over each (key, value) pair in `x` with each pair 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.


1 exampleSign in to add an example
Loading...
(eachp [k v] {:a "a val" :b "b val" :c "c val"} (print k " - " v))
# prints c - c val
# prints a - a val
# prints b - b val
pepePlayground