-
Notifications
You must be signed in to change notification settings - Fork 17
Description
~master-morzod:
"a function fits an interface if a) its argument type is equal-to or less specific and b) its result type is equal-to or more specific than those of the interface"
no, i'm describing %iron / |~` / ^| / $-
%lead / ^? is bivariant
%lead / ^? is bivariant (wrt the payload)
(in a completely trivial way, since the payload is not observable from outside the core)
%lead and %gold (invariant) pertain to the entire payload, %iron and %zinc pertain to the sample (head of the payload), and both have an effectively %lead context (tail of the payload). additionally, %iron lets you write but not read the sample, while %zinc lets you read but not write the sample
and yes, all 4 are covariant (ie, follow normal nesting rules) with regard to the products of their arms