Function solve

Source
fn solve(input: &str, predicate: fn(&str, u32) -> bool) -> usize