rescript-lang/rescript-lang.org
Document co / contravariance (`<+a>`, `<-a>`)
Offen
#149 geöffnet am 01.01.2021
help wantedmanual
Repository-Metriken
- Stars
- (1.855 Sterne)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
This one is definitely an advanced topic.
- What does
+and-mean? - What syntax constructs are possible? (type, function, etc.)
- What practical use-cases does it have / Why do we need it?
Things to avoid:
- Complex / too scientific wording
- Too generic examples without practical context
Hints:
- We use a covariant type in
Js.Promise.t(see it here)