@@ -281,6 +281,15 @@ splitWith p xs = loop xs
281281 | otherwise = l : loop (tail s')
282282 where (l, s') = break p s
283283
284+prop_T_chunksOf_same_lengths k t
285+ = all ((==k) . T.length) . ini . T.chunksOf k $ t
286+ where ini [] = []
287+ ini xs = init xs
288+
289+prop_T_chunksOf_length k t = let len = L.foldl' f 0 (T.chunksOf k t)
290+ in len == T.length t || (k <= 0 && len == 0)
291+ where f s t = T.length t + s
292+
284293prop_T_breakSubstring_isInfixOf s l
285294 = T.isInfixOf s l ==
286295 T.null s || (not . T.null . snd $ T.breakSubstring s l)
@@ -513,6 +522,8 @@ tests = [
513522 ("prop_TL_split_i", mytest prop_TL_split_i),
514523 ("prop_T_splitWith", mytest prop_T_splitWith),
515524 ("prop_TL_splitWith", mytest prop_TL_splitWith),
525+ ("prop_T_chunksOf_same_lengths", mytest prop_T_chunksOf_same_lengths),
526+ ("prop_T_chunksOf_length", mytest prop_T_chunksOf_length),
516527 ("prop_T_breakSubstringC", mytest prop_T_breakSubstringC),
517528 ("prop_T_breakSubstring_isInfixOf", mytest prop_T_breakSubstring_isInfixOf),
518529