lib/nydp/compiler.rb in nydp-0.3.0 vs lib/nydp/compiler.rb in nydp-0.4.0
- old
+ new
@@ -38,10 +38,10 @@
end
def self.compile_pair expression, bindings
key = expression.car
if sym?(key, :cond)
- Cond.build expression.cdr, bindings
+ Cond.build expression.cdr, bindings # todo: replace with function? (cond x (fn () iftrue) (fn () iffalse)) -->> performance issues, creating two closures for every cond invocation
elsif sym?(key, :quote)
Literal.build expression.cadr, bindings
elsif sym?(key, :assign)
Assignment.build expression.cdr, bindings
elsif sym?(key, :fn)