Ruby-Pair/main.rb
#list? method, returns true, if empty list, or a pair whose second element is a list.
list. method, returns true, if empty list, or a pair whose second element is a list.
list . method returns true if empty list or a pair whose second element is a list .
def list?
    if @value2.pair?
      if @value2.cdr.is_a?(Pair) || @value2.cdr.nil?
        true
      else
        false
      end
    else
      false
    end
  end
def list? if @value2 . pair? if @value2 . cdr . is_a? ( Pair ) || @value2 . cdr . nil? true else false end else false end end
list?
list?