on master help sign in
Rewrite a few properties for clarity.

--HG-- extra : convert_revision : 32e6dd91265dd3a812cbb4114abae6baf6f54706

commit64b354a70a31df4917394ee0732bbf3a6535925b authorBryan O'Sullivan <bos@serpentine.com> dateFri 14 Aug 2009, 06:48 (17 years ago) parenta181624
1 file changed+3−5
tests/Properties.hs+3−5
tests/Properties.hs+3−5
@@ -323,14 +323,12 @@ splitWith p xs = loop xs
323323 | otherwise = l : loop (tail s')
324324 where (l, s') = break p s
325325
326−prop_T_chunksOf_same_lengths k t
327− = all ((==k) . T.length) . ini . T.chunksOf k $ t
326+prop_T_chunksOf_same_lengths k = all ((==k) . T.length) . ini . T.chunksOf k
328327 where ini [] = []
329328 ini xs = init xs
330329
331−prop_T_chunksOf_length k t = let len = L.foldl' f 0 (T.chunksOf k t)
332− in len == T.length t || (k <= 0 && len == 0)
333− where f s t = T.length t + s
330+prop_T_chunksOf_length k t = len == T.length t || (k <= 0 && len == 0)
331+ where len = L.sum . L.map T.length $ T.chunksOf k t
334332
335333prop_T_breakSubstring_isInfixOf s l
336334 = T.isInfixOf s l ==