module Turbopuffer::Internal::Util
def deep_merge(*values, sentinel: nil, concat: false)
-
(Object)
-
Parameters:
-
concat
(Boolean
) -- whether to merge sequences by concatenation. -
sentinel
(Object, nil
) -- the value to return if no values are provided. -
values
(Array
) --
Other tags:
- Api: - private
def deep_merge(*values, sentinel: nil, concat: false) case values in [value, *values] values.reduce(value) do |acc, val| deep_merge_lr(acc, val, concat: concat) end else sentinel end end