Skip to content

Beef up core variance. #51

@sigilante

Description

@sigilante

~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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions