Class: Campa::Lisp::Defun
- Inherits:
-
Object
- Object
- Campa::Lisp::Defun
- Defined in:
- lib/campa/lisp/defun.rb
Instance Method Summary collapse
- #call(label, params, *body, env:) ⇒ Object
-
#initialize ⇒ Defun
constructor
A new instance of Defun.
- #macro? ⇒ Boolean
Constructor Details
Instance Method Details
#call(label, params, *body, env:) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/campa/lisp/defun.rb', line 13 def call(label, params, *body, env:) raise label_error(label) if !label.is_a?(Symbol) label_fn.call( label, invoke_lambda(params, body), env: env ) end |
#macro? ⇒ Boolean
9 10 11 |
# File 'lib/campa/lisp/defun.rb', line 9 def macro? true end |