JanetDocsI'm feeling luckyGithub sign in

map



    function
    boot.janet on line 855, column 1

    (map f & inds)
    
    Map a function over every element in an indexed data structure and
    return an array of the results.


2 examplesSign in to add an example
Loading...
(map |(+ $0 $1) [1 2 3] [4 5 6]) # @[5 7 9] - uses the fn shorthand
ahungry
(map string/from-bytes "Hello, world!")  # => @["H" "e" "l" "l" "o" "," " " "w" "o" "r" "l" "d" "!"]
GrayJack