Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuihtlauac ALVARADO committed Nov 27, 2023
1 parent e40067d commit e1c0e64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/tutorials/language/0lg_10_polymorphic_variants.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ Adding tags to a polymorphic variant codomain of a function is harmless. Extendi
The function type is _contravariant_ on domains. Casting a function is allowed if the target domain is smaller.
```ocaml
# let upcast_cod (f : [ `Night | `Day ] -> int) = (x :> [ `Night ] -> int);;
val f : ([ `Night | `Day ] -> int) -> [ `Night ] -> int = <fun>
val upcast_cod : ([ `Night | `Day ] -> int) -> [ `Night ] -> int = <fun>
```

Contravariance means subtyping “is reversed”:
Expand Down

0 comments on commit e1c0e64

Please sign in to comment.