Strumenti Utente

Strumenti Sito


Questa è una vecchia versione del documento!

Introducing skeleton semantics with higher order functions

This is an summary of the lesson given on March 23rd.

We represent the functional semantics of skeletons with higher order functions. We use Ocaml for the examples.

Assuming that data streams are represented with Ocaml lists (just for the moment), a farm skeleton may be defined as follows:

let rec farm f x = 
  match (x) with 
  [] -> []
| listHead::listTail -> (f listHead)::(farm f listTail);;
magistraleinformaticanetworking/spm/ocamlfs1.1300895696.txt.gz · Ultima modifica: 23/03/2011 alle 15:54 (11 anni fa) da Marco Danelutto