Class: Symbol

Inherits:
Object show all
Defined in:
lib/forsta/symbol.rb

Instance Method Summary collapse

Instance Method Details

#construct_list?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/forsta/symbol.rb', line 2

def construct_list?
  self == :nil
end

#lisp_eval(environment, forms) ⇒ Object



10
11
12
# File 'lib/forsta/symbol.rb', line 10

def lisp_eval(environment, forms)
  environment.lookup(self)
end

#to_arrayObject



6
7
8
# File 'lib/forsta/symbol.rb', line 6

def to_array
  construct_list? ? [] : self
end