Thun/docs/reference/map.md

582 B

Combinator Given a list of items and a quoted program run the program for each item in the list (with the rest of the stack) and replace the old list and the program with a list of the results.
## map Combinator Given a list of items and a quoted program run the program for each item in the list (with the rest of the stack) and replace the old list and the program with a list of the results. ### Example 5 [1 2 3] [++ *] map
       5 [10 15 20]

Discussion

This is a common operation in many languages. In Joy it can be a parallelism combinator due to the "pure" nature of the language.

[app1] [app2] [app3] appN [fork]