def intervalsIntersect(a1, b1, a2, b2):
    """
    Returns True if the specified half-closed intervals [a1, b1)
    and [a2, b2) intersect.
    """
    # Intervals do not interset if [a1, b1) is wholly to the left
    # or right of [a2, b2).
    return not (b1 <= a2 or a1 >= b2)