Binary

class Binary<T>(val operation: String, val function: Function<T>, val left: TypedMst<T>, val right: TypedMst<T>) : TypedMst<T> (source)

A node containing binary operation.

Parameters

T

the type.

Constructors

Link copied to clipboard
constructor(operation: String, function: Function<T>, left: TypedMst<T>, right: TypedMst<T>)

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 binary function implementing this operation.

Link copied to clipboard

The left operand.

Link copied to clipboard

The identifier of operation.

Link copied to clipboard

The right operand.