Browse thread
type generalization of recursive calls
-
Stéphane Gimenez
-
Boris Yakobowski
- Dario Teixeira
- Stéphane Gimenez
-
Boris Yakobowski
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-02-17 (20:25) |
From: | Dario Teixeira <darioteixeira@y...> |
Subject: | Re: [Caml-list] type generalization of recursive calls |
Hi, > Finally, starting from Ocaml 3.13, you can simply write > > let rec map : 'a 'b. ('a -> 'b) -> 'a t -> 'b t = > fun f -> function > | E -> E > | D (t1, t2) -> D (map f t1, map f t2) > | O a -> O (f a) > | I tt -> I (map (map f) tt) Assuming "3.13" is not a typo, and that you do not actually mean the upcoming 3.12, what features can we expect in future versions of Ocaml? Just curious, Dario Teixeira