Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beef up core variance. #51

Open
sigilante opened this issue Dec 16, 2023 · 0 comments
Open

Beef up core variance. #51

sigilante opened this issue Dec 16, 2023 · 0 comments

Comments

@sigilante
Copy link
Contributor

~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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant