Return the element of vector that is closest to scalar in absolute difference. If there is a tie, return the first such element in vector.
vector
scalar
solve(...)