coercions
git-svn-id: http://caml.inria.fr/svn/ocamldoc/trunk@9980 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
7ffc4c20cf
commit
f47f50a04f
|
@ -389,6 +389,7 @@ source type may be omitted.
|
|||
\begin{caml_example}
|
||||
type 'a wlist = [`Nil | `Cons of 'a * 'a wlist | `Snoc of 'a wlist * 'a];;
|
||||
let wlist_of_vlist l = (l : 'a vlist :> 'a wlist);;
|
||||
let open_vlist l = (l : 'a vlist :> [> 'a vlist]);;
|
||||
fun x -> (x :> [`A|`B|`C]);;
|
||||
\end{caml_example}
|
||||
|
||||
|
|
Loading…
Reference in New Issue