straddles_interval = function(lo,hi, border) return lo <= border and hi >= border end