prop_unsafeAppend :: BagTest Int bag => 
        bag Int -> Int -> bag Int -> bag Int -> Bool
prop_unsafeAppend bag i xs ys =
    if null xs || null ys then
      unsafeAppend xs ys === union xs ys
    else
      unsafeAppend xs ys' === union xs ys'
  where delta = maxElem xs - minElem ys + (if odd i then 1 else 0)
        ys' = unsafeMapMonotonic (+delta) ys
  -- if unsafeMapMonotonic does any reorganizing in addition
  -- to simply replacing the elements, then this test will
  -- not provide even coverage
prop_unsafeAppend :: BagTest Int bag => 
        bag Int -> Int -> bag Int -> bag Int -> Bool
prop_unsafeAppend bag i xs ys =
    if null xs || null ys then
      unsafeAppend xs ys === union xs ys
    else
      unsafeAppend xs ys' === union xs ys'
  where delta = maxElem xs - minElem ys + (if odd i then 1 else 0)
        ys' = unsafeMapMonotonic (+delta) ys
  -- if unsafeMapMonotonic does any reorganizing in addition
  -- to simply replacing the elements, then this test will
  -- not provide even coverage
prop_unsafeAppend bag i xs ys =
    if null xs || null ys then
      unsafeAppend xs ys === union xs ys
    else
      unsafeAppend xs ys' === union xs ys'
  where delta = maxElem xs - minElem ys + (if odd i then 1 else 0)
        ys' = unsafeMapMonotonic (+delta) ys
  -- if unsafeMapMonotonic does any reorganizing in addition
  -- to simply replacing the elements, then this test will
  -- not provide even coverage