Version française
Home     About     Download     Resources     Contact us    
Browse thread
type generalization of recursive calls
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
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