From e40067db511e57101d46a800b0afde28bd54defa Mon Sep 17 00:00:00 2001 From: Cuihtlauac Alvarado Date: Mon, 27 Nov 2023 09:03:47 +0100 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Reynir Björnsson --- data/tutorials/language/0lg_10_polymorphic_variants.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/tutorials/language/0lg_10_polymorphic_variants.md b/data/tutorials/language/0lg_10_polymorphic_variants.md index f828786b44..81c1feace8 100644 --- a/data/tutorials/language/0lg_10_polymorphic_variants.md +++ b/data/tutorials/language/0lg_10_polymorphic_variants.md @@ -394,8 +394,8 @@ Note that these types are covariant because of the way their type parameters app The function type is covariant on codomains. Casting a function is allowed if the target codomain is larger. ```ocaml -# let upcast_dom (f : int -> [ `Night ]) = (x :> int -> [ `Night | `Day ]);; -val f : (int -> [ `Night ]) -> int -> [ `Night | `Day ] = +# let upcast_dom (f : int -> [ `Night ]) = (f :> int -> [ `Night | `Day ]);; +val upcast_dom : (int -> [ `Night ]) -> int -> [ `Night | `Day ] = ``` Covariance means subtyping “goes in the same direction”: