lib/traject/macros/transformation.rb
# calls ruby `uniq!` on accumulator, removes any duplicate values
#
# @example
#     to_field "something", extract_marc("245:240"), unique
calls ruby `uniq!` on accumulator, removes any duplicate values
calls ruby ` uniq! ` on accumulator removes any duplicate values
def unique
        lambda do |rec, acc|
          acc.uniq!
        end
      end
def unique lambda do | rec , acc | acc . uniq! end end
calls ruby `uniq!` on accumulator, removes any duplicate values
calls ruby ` uniq! ` on accumulator removes any duplicate values
example
to_field "something", extract_marc("245:240"), unique
to_field " something " extract_marc ( " 245 : 240 " ) unique