Class: Luoma::Lambda
- Inherits:
-
Expression
- Object
- Expression
- Luoma::Lambda
- Defined in:
- lib/luoma/expression.rb,
sig/luoma/expression.rbs
Instance Attribute Summary
Attributes inherited from Expression
Instance Method Summary collapse
- #children ⇒ Object
- #evaluate(context) ⇒ Object
-
#initialize(token, params, expr) ⇒ Lambda
constructor
(t_token, Array, Expression) -> void.
- #scope ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Method Details
#children ⇒ Object
735 736 737 |
# File 'lib/luoma/expression.rb', line 735 def children [@expr] end |
#evaluate(context) ⇒ Object
731 732 733 |
# File 'lib/luoma/expression.rb', line 731 def evaluate(context) ExpressionDrop.new(LambdaExpr.new(@params.map(&:value), @expr, context)) end |
#scope ⇒ Object
739 740 741 |
# File 'lib/luoma/expression.rb', line 739 def scope @params end |
#to_s ⇒ Object
744 745 746 |
# File 'lib/luoma/expression.rb', line 744 def to_s "(#{@params.join(", ")}) => #{@expr}" end |