pub fn transform_pattern<S, T, E, F>( pattern: &Pattern<S>, transform: F, ) -> Result<Pattern<T>, E>where F: FnMut(&S) -> Result<T, E>,