Add files via upload

This commit is contained in:
Andreas Olsson 2017-01-03 23:34:56 +01:00 committed by GitHub
parent e05f4a4ee3
commit 96331db074

View File

@ -1,4 +1,6 @@
#lang scribble/manual
@require[@for-label[pmap
racket/base
racket/future]]
@ -8,6 +10,18 @@
@defmodule[pmap]
"pmap" is a map function using futures to apply a function to all items in a list i parallel.
@section{General behavior}
It's restrictions is the same as for futures in general in Racket.
pmap works as map but applies the function to every item in the list/lists in parallel using futures.
It's restrictions is the same as for futures and map in general in Racket.
@section{Use}
@racketblock[
(pmap function list/lists)
>(map + '(1 2 3) '(1 2 3))
>'(2 4 6)
]
If the function applied is to simple pmap might perform worse than map because of the
overhead a future generates.