-----------------------------------------------------------------
-- OrdColl operations

prop_minView_maxView :: BagTest Int bag => bag Int -> bag Int -> Bool
prop_minView_maxView bag xs =
    minView xs == (if null xs then Nothing
                              else Just (minElem xs, deleteMin xs))
    &&
    maxView xs == (if null xs then Nothing
                              else Just (maxElem xs, deleteMax xs))
prop_minView_maxView :: BagTest Int bag => bag Int -> bag Int -> Bool
prop_minView_maxView bag xs =
    minView xs == (if null xs then Nothing
                              else Just (minElem xs, deleteMin xs))
    &&
    maxView xs == (if null xs then Nothing
                              else Just (maxElem xs, deleteMax xs))
prop_minView_maxView bag xs =
    minView xs == (if null xs then Nothing
                              else Just (minElem xs, deleteMin xs))
    &&
    maxView xs == (if null xs then Nothing
                              else Just (maxElem xs, deleteMax xs))