MultiLisp achieves parallelism with the PCALL macro, where
(PCALL Fun A B C ...)
is equivalent to
(Fun A B C ...)
except that the arguments A, B, C, etc. are explicitly allowed to be evaluated in parallel; this circumvents the usual order of evaluation, which is sequential and left to right. It also makes use of a parallel programming construct called futures, which resembles forking, combined with lazy evaluation. Using this construct, an expression such as
(cons (FUTURE A) (FUTURE B))
can be written, which will overlap the evaluation of the expressions A and B, not only with each other, but with computations that use the result of the cons call, until an operation is performed that needs correct information about the value of A or B.
WikiSysop; Mikaelm; Bjlucier; Thedens, Dan (2019-02-06). "Gambit". Retrieved 2019-04-21. http://dynamo.iro.umontreal.ca/wiki/index.php/Main_Page ↩