# Generic code

Only the standard library is generic (`List<T>`, `list.count`). Your own
callables take named types. A parameter that accepts several types is an
[enum](enums.md) whose variants carry each one:

```jadpo
type PartyId = Enum {
    customer: {
        id: Customer.id
    }
    supplier: {
        id: Supplier.id
    }
}

function party_label(party: PartyId) -> PartyTitle {
    return match party {
        PartyId.customer(customer) -> customer_label(customer.id)
        PartyId.supplier(supplier) -> supplier_label(supplier.id)
    }
}
```

`function first<T>(items: List<T>) -> T` and `Customer.id | Supplier.id`
are not Jadpo: your own code has no generics or unions.

For the same reason, your app's types never declare operators. Every
`a + b` is a row of the operator tables a reviewer can look up, and never
an overload ([The standard operator table](the-standard-operator-table.md)).
