anyis the second most senior type, inferior only to ⊤. It includes every value available to an Avail program, i.e., every Avail value except for the unexposed special value nil.
any is made extremely useful by the interaction of polymorphism and semantic restrictions. Many algorithms can be codified once in terms of
any and then strengthened via a semantic restriction that extrapolates a stronger result subtype from the static input types.
any is the most general type that may appear in the following contexts:
- As a parameter type of a function type.
- As the read type of a variable type.
- As a leading type or the default type of a tuple type.
- As the element type of a set type.
- As the key type or value type of a map type.
- As the field type of an object type.
- As the type parameter of a pojo type.