Logtalk reference manual
Built-in method: current_predicate/1
Contents > Reference Manual > Built-in Methods > current_predicate/1

## current_predicate/1

#### Description

    current_predicate(Predicate)

Enumerates, by backtracking, the visible user predicates for an object.

#### Template and modes

    current_predicate(?predicate_indicator)

#### Errors

Predicate is neither a variable nor a valid predicate indicator:
  `type_error(predicate_indicator, Predicate)`
Predicate is a Functor/Arity term but Functor is neither a variable nor an atom:
  `type_error(atom, Name)`
Predicate is a Functor/Arity term but Arity is neither a variable nor an integer:
  `type_error(integer, Arity)`
Predicate is a Functor/Arity term but Arity is a negative integer:
  `domain_error(not_less_than_zero, Arity)`

#### Examples

To enumerate, by backtracking, the locally visible user predicates or the user predicates visible in this:
  `current_predicate(Predicate)`
To enumerate, by backtracking, the public and protected user predicates visible in self:
  `::current_predicate(Predicate)`
To enumerate, by backtracking, the public user predicates visible for an explicit object:
  `Object::current_predicate(Predicate)`

#### See also

`current_op/3`, `predicate_property/2`