class

Myst::TFunctor

Inherits Myst::MutableValue / Reference / Object

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

Constructors

new(name : String, clauses : Array(Myst::TFunctorDef | Bool | Float64 | Int64 | Myst::MutableValue | String, Array(Bool | Float64 | Int64 | Myst::MutableValue | String), Nil | Myst::TFunctor -> Bool | Float64 | Int64 | Myst::MutableValue | String) = [] of Callable, lexical_scope : Scope = Scope.new, closure : Bool = false, closed_self : MTValue | Nil = nil)
Source

Instance methods

==(other : self)

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

add_clause(definition : Callable)
Source
clauses
Source
clauses=(clauses : Array(Callable))
Source
closed_self
Source
closed_self=(closed_self : MTValue | Nil)
Source
closed_self?
Source
closure=(closure : Bool)
Source
closure?
Source
hash(hasher)

See Object#hash(hasher)

inspect(io : IO)

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Source
lexical_scope
Source
lexical_scope=(lexical_scope : Scope)
Source
name
Source
name=(name : String)
Source
new_scope
Source
type_name
Source