From 96331db074f3c11b64bd370965d6cff4d2dbbdf3 Mon Sep 17 00:00:00 2001 From: Andreas Olsson Date: Tue, 3 Jan 2017 23:34:56 +0100 Subject: [PATCH] Add files via upload --- pmap.scrbl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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