represents a type parameterized by x.
represents a type satisfying cond.
represents a type with multiple parameters.
- ForAllType does not evaluate on its own but can be used inside functions that accept types including Typed, FunctionDeclaration, etc.
- ForAllType is used to specify the type of polymorphic functions.
- Possible forms for cond include:
Element[x,"absType"] assert that x is a member of an abstract type TypeEvaluate[…] run an arbitrary function
- cond can take the form Element[xi,"absType"], where "absType" is an abstract type. »
- TypeEvaluate can be used in cond. »
- cond can be given as a list of conditions.
Examplesopen allclose all
Basic Examples (1)
Wolfram Research (2022), ForAllType, Wolfram Language function, https://reference.wolfram.com/language/ref/ForAllType.html.
Wolfram Language. 2022. "ForAllType." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ForAllType.html.
Wolfram Language. (2022). ForAllType. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ForAllType.html