Sha256: 055dba20b2dfc56a85951d7997721ff1dd43ee3e7dffed6f7f2607900c6f1059
Contents?: true
Size: 364 Bytes
Versions: 14
Compression:
Stored size: 364 Bytes
Contents
require_relative '../function' Dentaku::AST::Function.register(:mul, :numeric, ->(*args) { if args.empty? raise Dentaku::ArgumentError.for( :too_few_arguments, function_name: 'MUL()', at_least: 1, given: 0 ), 'MUL() requires at least one argument' end args.flatten.map { |arg| Dentaku::AST::Function.numeric(arg) }.reduce(1, :*) })
Version data entries
14 entries across 14 versions & 2 rubygems