Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
module aggregation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1996-06-13 (09:46)
From: Franck Delaplace <delapla@l...>
Subject: module aggregation

I want to aggregate two modules in one in order
to improve some standard modules or some module
define by functors . How can I do this in Ocaml ? 

for instance I want to have a function 
which gives a list of cartesian product of l1 l2 

let cartesian_map  f l1 l2 = List.flatten ( (fun(a)-> (f a) l2) l1);;

val cartesian_map : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list = <fun>

and I would like to call it  List.cartesian_map 

I have also the same problem for module defined by Functor
I want to add some specific functions once the module is defined.

Thank you 


Franck Delaplace.	Tel: +33 (1) 6947 7463	email : 

LAboratoire de Mathematiques et d'Informatique (LAMI)
Equipe Parallelisme  (
Universite d'Evry Val d'Essonne                                                 
Cours Monseigneur Romero