-- |Checks that any series of length 3 has a third largest element and checks whether
-- the error checking version is then equivalent to the naive version.  
prop_isThirdLargest :: Double -> Double -> Int -> Property
prop_isThirdLargest fstNum growthRate len = 
  let ss = seriesN fstNum growthRate len
  in length ss >= 3 ==> 
   case special1 ss of 
        Left _  -> False -- We got an error message despite the list being length 3
        Right x -> x == third ss 

-- |A series of N numbers should be equal to the same series filtered for duplicates.
prop_isThirdLargest :: Double -> Double -> Int -> Property
prop_isThirdLargest fstNum growthRate len = 
  let ss = seriesN fstNum growthRate len
  in length ss >= 3 ==> 
   case special1 ss of 
        Left _  -> False -- We got an error message despite the list being length 3
        Right x -> x == third ss 

-- |A series of N numbers should be equal to the same series filtered for duplicates.
prop_isThirdLargest fstNum growthRate len = 
  let ss = seriesN fstNum growthRate len
  in length ss >= 3 ==> 
   case special1 ss of 
        Left _  -> False -- We got an error message despite the list being length 3
        Right x -> x == third ss 

-- |A series of N numbers should be equal to the same series filtered for duplicates.