# File lib/ruote/exp/fe_concurrence.rb, line 375
    def keep(workitem)

      h.workitems = h.workitems.values if h.workitems.is_a?(Hash)
        # align legacy expressions on new simplified way

      if h.workitems
        #
        # the old way (still used for highest / lowest)

        h.workitems << workitem
        return
      end

      #
      # the new way, merging immediately

      h.workitem_count = (h.workitem_count || 0) + 1

      return if h.cmerge_type == 'ignore'

      # preparing target and source in the right order for merging

      target, source = h.workitem, workitem
      if
        h.cmerge == 'first' &&
        ! %w[ stack union concat deep isolate ].include?(h.cmerge_type)
      then
        target, source = source, target
      end
      target, source = source, target if target && target.delete('winner')
      target, source = source, target if source == nil

      h.workitem = Ruote.merge_workitem(
        workitem_index(workitem), target, source, h.cmerge_type)
    end