module Rus3::EmptyList

An empty list is a special object in Scheme language. The role roughly corresponds to the one of 'nil' in Ruby.

Constants

EMPTY_LIST

Represents an empty list.

Public Instance Methods

null?(obj) click to toggle source

Returns true if the argument is an empty list. RuS^3 treats nil (an instance of NilClass) as an empty list.

# File lib/rus3.rb, line 19
def null?(obj)
  obj.instance_of?(Array) and obj.empty?
end