def _blockid(self,XX):
        """Return value such that all blocks with the same
        pattern of increments and decrements get the same id.
        """
        id = 0
        for i in range(1,len(XX)):
            id = id*2 + (XX[i] > XX[i-1])
        return id
Return value such that all blocks with the same
        pattern of increments and decrements get the same id.
        
recipes/Python/252123_Range_minimleast/recipe-252123.py