pub fn merge_collect<I, F, G, U, S, R>(
    state: &mut S,
    types: I,
    action: F,
    converter: G
) -> Option<R>
where S: ?Sized, I: IntoIterator, I::IntoIter: FusedIterator + Clone, F: FnMut(&mut S, I::Item) -> Option<U>, G: FnMut(&mut S, I::Item) -> U, R: FromIterator<U>,