class Myst::TFunctor

Overview

A Functor is a container for multiple functor definitions, which can either be language-level or native.

Defined in:

myst/interpreter/value.cr

Constructors

Instance Method Summary

Instance methods inherited from class Myst::Value

ivars : Scope ivars, ivars=(ivars : Scope) ivars=, truthy? truthy?, type_name type_name

Class methods inherited from class Myst::Value

from_literal(literal : Node) from_literal

Constructor Detail

def self.new(clauses : Array(Myst::TFunctorDef | Myst::Value, Array(Myst::Value), Nil | Myst::TFunctor -> Myst::Value) = [] of Callable, lexical_scope : Scope = Scope.new, closure : Bool = false) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def add_clause(definition : Callable) #

[View source]
def clauses : Array(Callable) #

[View source]
def clauses=(clauses : Array(Callable)) #

[View source]
def closure=(closure : Bool) #

[View source]
def closure? : Bool #

[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def lexical_scope : Scope #

[View source]
def lexical_scope=(lexical_scope : Scope) #

[View source]
def new_scope #

[View source]
def type_name #

[View source]