class Myst::TFunctor
- Myst::TFunctor
- Myst::Value
- Reference
- Object
Overview
A Functor is a container for multiple functor definitions, which can either be language-level or native.
Defined in:
myst/interpreter/value.crConstructors
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. - #add_clause(definition : Callable)
- #clauses : Array(Callable)
- #clauses=(clauses : Array(Callable))
- #closure=(closure : Bool)
- #closure? : Bool
-
#hash(hasher)
See
Object#hash(hasher)
- #lexical_scope : Scope
- #lexical_scope=(lexical_scope : Scope)
- #new_scope
- #type_name
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)
#
Instance Method Detail
def ==(other : self)
#
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.