Class: AjLisp::FPrimitive

Inherits:
Object
  • Object
show all
Defined in:
lib/ajlisp/fprimitive.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(context, list) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ajlisp/fprimitive.rb', line 5

def evaluate(context, list)
       if list == nil
           return self
       end
   
	args = []
	rest = list.rest
	
	while rest != nil
		args.push(rest.first)
		rest = rest.rest
	end
	
	return apply(context, args)
end