cognition.util.functypes

Functional types

ala https://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html

Attributes

Supplier

Represents a supplier of results.

Function

Represents a function that accepts one argument and produces a result.

BiFunction

Represents a function that accepts two arguments and produces a result.

TriFunction

Represents a function that accepts three arguments and produces a result.

Consumer

Represents an operation that accepts a single input argument and returns no result.

BiConsumer

Represents an operation that accepts two input arguments and returns no result.

Predicate

Represents a predicate (boolean-valued function) of one argument.

BiPredicate

Represents a predicate (boolean-valued function) of two arguments.

Module Contents

type cognition.util.functypes.Supplier = Callable[[], X]

Represents a supplier of results.

type cognition.util.functypes.Function = Callable[[X], Y]

Represents a function that accepts one argument and produces a result.

type cognition.util.functypes.BiFunction = Callable[[X, Y], Z]

Represents a function that accepts two arguments and produces a result.

type cognition.util.functypes.TriFunction = Callable[[X, Y, Z], Q]

Represents a function that accepts three arguments and produces a result.

type cognition.util.functypes.Consumer = Function[X, None]

Represents an operation that accepts a single input argument and returns no result.

type cognition.util.functypes.BiConsumer = BiFunction[X, Y, None]

Represents an operation that accepts two input arguments and returns no result.

type cognition.util.functypes.Predicate = Function[X, bool]

Represents a predicate (boolean-valued function) of one argument.

type cognition.util.functypes.BiPredicate = BiFunction[X, Y, bool]

Represents a predicate (boolean-valued function) of two arguments.