Returns the closest value to x from xs.
x
If xs is empty then x is returned as is.
closest([0, 3, 6])(1.8);// ⮕ 3 Copy
closest([0, 3, 6])(1.8);// ⮕ 3
Returns the closest value to
xfrom xs.If xs is empty then
xis returned as is.