def areContiguous(refWindows):
    """
    Predicate that determines whether the reference/scaffold windows
    are contiguous.
    """
    lastEnd = None
    lastId  = None
    for refWin in refWindows:
        id, start, end = refWin
        if ((lastId is not None and id != lastId) or
            (lastEnd is not None and start != lastEnd)):
            return False
        lastEnd = end
        lastId  = id
    return True