class Ven::Suite::MConcreteFunction
Overview
Ven's most essential function type. It has an identity,
which is provided through a set of constraints. All concrete
functions have identity. All concrete functions are constrained,
though MType::ANY
can be used to immitate unconstraintness.
Defined in:
ven/suite/model.crConstructors
Instance Method Summary
-
#<=>(other : MConcreteFunction)
Compares this function's arity with the other's arity.
-
#==(other : MConcreteFunction)
Returns whether this function's signature is equal to other's.
- #arity : UInt8
- #body : Quotes
- #constraints : ConstrainedParameters
- #field(name)
- #name : String
- #params : Array(String)
- #priority : Int32
-
#priority?
Computes the priority of this concrete.
- #slurpy : Bool
- #tag : QTag
- #to_s(io)
Instance methods inherited from class Ven::Suite::MFunction
callable?
callable?
Instance methods inherited from class Ven::Suite::MClass
callable? : Bool
callable?,
eqv?(other : Model) : Bool
eqv?,
field(name : String) : Model | Nil
field,
is_bool_false? : Bool
is_bool_false?,
of?(other : MType) : Boolof?(other) of?, 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?, truth=(truth : Bool) truth=, truth? truth?
Constructor Detail
def self.new(tag : Ven::Suite::QTag, name : String, constraints : Array(Ven::Suite::ConstrainedParameter), body : Array(Ven::Suite::Quote), slurpy : Bool)
#
Instance Method Detail
def priority?
#
Computes the priority of this concrete. Priority is the sum of weights of the parameters this concrete takes (including anonymous parameters) multiplied by the amount of them.