def span_overlap(a, b):
    """
    Compute overlap of span where left is inclusive, right is exclusive.

    span_overlap([0, 3], [3, 5]) -> 0
    span_overlap([0, 3], [2, 5]) -> 1
    span_overlap([0, 5], [0, 2]) -> 2
    """
    return max(0, min(a[1], b[1]) - max(a[0], b[0]))