class Ven::Suite::MBuiltinFunction
Overview
A model that brings Crystal's Proc
s to Ven, allowing
to define primitives. Supports supervisorship by an
MGenericFunction
.
Defined in:
ven/suite/model.crConstructors
Instance Method Summary
-
#==(other : MBuiltinFunction)
Returns whether this builtin's identity is equal to the other builtin's identity.
- #arity : Int32
- #callee : Proc(Machine, Models, Model)
- #field(name)
-
#length : Int32
Returns the length (#) of this model.
- #name : String
-
#specificity
Returns how specific this builtin is.
- #to_s(io)
- #variant?(args) : self | Bool
Instance methods inherited from class Ven::Suite::MFunction
callable?
callable?,
leading?(type : Model)
leading?,
pg(params : Array(String), given : Models)
pg,
specificity : Int32
specificity,
variant?(args : Models)
variant?
Instance methods inherited from class Ven::Suite::MClass
[]=(referent : Model, value : Model) : Model | Nil
[]=,
[]?(index : Int)[]?(index : Range) []?, callable? : Bool callable?, eqv?(other : Model) : Bool eqv?, false? : Bool false?, field(name : String) : Model | Nil field, indexable? indexable?, length : Int32 length, match(other : Model) match, nth(index : Num)
nth(range : MRange)
nth(other) nth, of?(other : MType) : Bool
of?(other : MAny)
of?(other) of?, set_referent(referent : Model, value : Model) : Model set_referent, to_bool(inverse = false) : MBool to_bool, to_num : Num to_num, to_str : Str to_str, to_vec : Vec to_vec, true? : Bool true?, weight : MWeight weight
Constructor Detail
def self.new(name : String, arity : Int32, callee : Ven::Machine, Array(Ven::Suite::MClass | Ven::Suite::MStruct) -> Ven::Suite::MClass | Ven::Suite::MStruct)
#
Instance Method Detail
def ==(other : MBuiltinFunction)
#
Returns whether this builtin's identity is equal to the other builtin's identity.
def length : Int32
#
Description copied from class Ven::Suite::MClass
Returns the length (#) of this model.
def specificity
#
Returns how specific this builtin is. Note that in builtins
all arguments have the weight of MWeight::ANY
.