# File lib/cons.rb, line 21 def to_a if @cdr.respond_to? :to_a [@car] + @cdr.to_a elsif !@cdr.nil? [@car, @cdr] else [@car] end end