Class: Campa::Lisp::LambdaFn
- Inherits:
-
Object
- Object
- Campa::Lisp::LambdaFn
- Defined in:
- lib/campa/lisp/lambda_fn.rb
Instance Method Summary collapse
- #call(params, *body, env:) ⇒ Object
-
#initialize ⇒ LambdaFn
constructor
A new instance of LambdaFn.
- #macro? ⇒ Boolean
Constructor Details
Instance Method Details
#call(params, *body, env:) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/campa/lisp/lambda_fn.rb', line 12 def call(params, *body, env:) raise parameters_error(printer.call(params)) if !params.respond_to?(:find) validate_params(params) Lambda.new(params, body, env) end |
#macro? ⇒ Boolean
8 9 10 |
# File 'lib/campa/lisp/lambda_fn.rb', line 8 def macro? true end |