I would like to be able to find the nearest smaller value in an array of numbers. For instance, if I have:
[1, 4, 6, 9, 14, 39]
And I\'m lo
Given that the array is sorted , You need
if let value = numbers.last(where: { $0 <= target }) { print(value) }