Class: Campa::Lisp::Car
- Inherits:
-
Object
- Object
- Campa::Lisp::Car
- Defined in:
- lib/campa/lisp/car.rb
Instance Method Summary collapse
- #call(list) ⇒ Object
-
#initialize ⇒ Car
constructor
A new instance of Car.
Constructor Details
#initialize ⇒ Car
4 5 6 |
# File 'lib/campa/lisp/car.rb', line 4 def initialize @printer = Printer.new end |
Instance Method Details
#call(list) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/campa/lisp/car.rb', line 8 def call(list) return nil if list.nil? || list == List::EMPTY raise illegal_argument(list) if !list.is_a?(List) list.head end |