accept

abstract fun <T> accept(visitor: TermVisitor<T>): T

Lets the provided TermVisitor navigate the current term and build an object of type T. Such an object is then returned as a result by this method.

See also: https://en.wikipedia.org/wiki/Visitor_pattern for more information concerning the GoF's Visitor pattern.

Return

an object of type T, produced by visitor through its visit

Parameters

visitor

is a TermVisitor, i.e., an object aimed at navigating the current term

Type Parameters

T

is the type of the object built by visitor through its visit