lib/nydp/builtin/divide.rb in nydp-0.0.10.1 vs lib/nydp/builtin/divide.rb in nydp-0.0.11
- old
+ new
@@ -1,13 +1,17 @@
class Nydp::Builtin::Divide
- def invoke vm, args
+ include Nydp::Builtin::Base
+
+ def builtin_invoke vm, args
vm.push_arg divide(args.cdr, args.car)
end
def divide args, accum
if Nydp.NIL.is? args
accum
else
divide(args.cdr, (accum / args.car))
end
end
+
+ def name ; "/" ; end
end