I want to implement Lisp's mapcar in Ruby. Wishful syntax: mul = -> (*args) { args.reduce(:*) } mapcar(mul, [1,2,3], [4,5], [6]) would yield [24, nil, nil]. Here is the solution I could think of: arrs[0].zip(arrs[1], arrs[2]) => [[1, 4, 6], [2, 5, nil], [3, nil, nil]] Then I could: [[1, 4, 6], [2, 5, nil], [3, nil, nil]].map do |e| e.reduce(&mul) unless e.include?(nil) end => [24, nil, nil] But I'