Unary

class Unary<T>(val operation: String, val function: (T) -> T, val value: TypedMst<T>) : TypedMst<T> (source)

A node containing a unary operation.

Parameters

T

the type.

Constructors

Link copied to clipboard
constructor(operation: String, function: (T) -> T, value: 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
val function: (T) -> T

The function implementing this operation.

Link copied to clipboard

The identifier of operation.

Link copied to clipboard

The argument of this operation.