fn map_with_ranges(haystack: &[u16], other: &[u16], needle: u16) -> u16