diff --git a/pmap.scrbl b/pmap.scrbl index ccd133d..f5b3282 100644 --- a/pmap.scrbl +++ b/pmap.scrbl @@ -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. \ No newline at end of file