Problem
Helper functions in the ir module for converting StringOrList values (map_string_or_list, to_paths, to_string_vec, extract_single) are scattered and create repetition.
Proposed Solution
Convert these helper functions into methods on the StringOrList type to:
- Reduce repetition
- Centralise behaviour
- Improve encapsulation
Context
Problem
Helper functions in the
irmodule for convertingStringOrListvalues (map_string_or_list,to_paths,to_string_vec,extract_single) are scattered and create repetition.Proposed Solution
Convert these helper functions into methods on the
StringOrListtype to:Context