Such as a Contract
Type whose extraInfo
field can contain any type of content.
let Contract = {
Type = {
name: Text,
phone: Text,
extraInfo: Any
}
}
Such as a Contract
Type whose extraInfo
field can contain any type of content.
let Contract = {
Type = {
name: Text,
phone: Text,
extraInfo: Any
}
}
You can make Contract
a type-level function, whose input is the type of the extraInfo
field:
let Contract =
λ(a : Type) → { Type : { name : Text, phone : Text, extraInfo : a } }
let example
: Contract Bool
= { Type = { name = "John", phone = "555-555-5555", extraInfo = True } }
in example