pub fn walk_move_types<'a, I, F, T, S, R>(
    state: &mut S,
    types: I,
    f: F
) -> Option<R>
where S: ?Sized, I: IntoIterator<Item = &'a T>, I::IntoIter: FusedIterator + Clone, F: FnMut(&mut S, &'a T) -> Option<T>, T: Clone + 'a, R: FromIterator<T>,