Variable

class Variable<T>(val symbol: Symbol) : TypedMst<T> (source)

The node containing a variable

Parameters

T

the type.

Constructors

Link copied to clipboard
constructor(symbol: Symbol)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun <T> TypedMst<T>.interpret(algebra: Algebra<T>, vararg arguments: Pair<Symbol, T>): T

Interprets the TypedMst node with this Algebra and optional arguments.

fun <T> TypedMst<T>.interpret(algebra: Algebra<T>, arguments: Map<Symbol, T>): T

Interprets the TypedMst node with this Algebra and arguments.

Link copied to clipboard
fun <T : Any> TypedMst<T>.toExpression(algebra: Algebra<T>): Expression<T>

Interpret this TypedMst node as expression.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard

The symbol of the variable.