Logtalk reference manual
Built-in predicate: extends_category/2-3
Contents > Reference Manual > Built-in Predicates > extends_category/2-3

## extends_category/2-3

#### Description

    extends_category(Category1, Category2)
    extends_category(Category1, Category2, Scope)

Enumerates, by backtracking, all pairs of categories such that the first one extends the second. The relation scope is represented by the atoms `public`, `protected`, and `private`.

#### Template and modes

    extends_category(?category_identifier, ?category_identifier)
    extends_category(?category_identifier, ?category_identifier, ?scope)

#### Errors

Category1 is neither a variable nor a valid protocol identifier:
  `type_error(category_identifier, Category1)`
Category2 is neither a variable nor a valid protocol identifier:
  `type_error(category_identifier, Category2)`
Scope is neither a variable nor an atom:
  `type_error(atom, Scope)`
Scope is not a valid entity scope:
  `domain_error(scope, Scope)`

#### Examples

    | ?- extends_category(basic, Category).

    | ?- extends_category(Category, extended, private).