@@ -1042,7 +1042,7 @@ minimum t = S.minimum (stream t)
1042
1042
-- __Properties__
1043
1043
--
1044
1044
-- @'head' ('scanl' f z xs) = z@
1045
- --
1045
+ --
1046
1046
-- @'last' ('scanl' f z xs) = 'foldl' f z xs@
1047
1047
scanl :: (Char -> Char -> Char ) -> Char -> Text -> Text
1048
1048
scanl f z t = unstream (S. scanl g z (stream t))
@@ -1848,14 +1848,14 @@ unwords = intercalate (singleton ' ')
1848
1848
{-# INLINE unwords #-}
1849
1849
1850
1850
-- | /O(n)/ The 'isPrefixOf' function takes two 'Text's and returns
1851
- -- 'True' iff the first is a prefix of the second.
1851
+ -- 'True' if and only if the first is a prefix of the second.
1852
1852
isPrefixOf :: Text -> Text -> Bool
1853
1853
isPrefixOf a@ (Text _ _ alen) b@ (Text _ _ blen) =
1854
1854
alen <= blen && S. isPrefixOf (stream a) (stream b)
1855
1855
{-# INLINE [1] isPrefixOf #-}
1856
1856
1857
1857
-- | /O(n)/ The 'isSuffixOf' function takes two 'Text's and returns
1858
- -- 'True' iff the first is a suffix of the second.
1858
+ -- 'True' if and only if the first is a suffix of the second.
1859
1859
isSuffixOf :: Text -> Text -> Bool
1860
1860
isSuffixOf a@ (Text _aarr _aoff alen) b@ (Text barr boff blen) =
1861
1861
d >= 0 && a == b'
@@ -1865,7 +1865,7 @@ isSuffixOf a@(Text _aarr _aoff alen) b@(Text barr boff blen) =
1865
1865
{-# INLINE isSuffixOf #-}
1866
1866
1867
1867
-- | /O(n+m)/ The 'isInfixOf' function takes two 'Text's and returns
1868
- -- 'True' iff the first is contained, wholly and intact, anywhere
1868
+ -- 'True' if and only if the first is contained, wholly and intact, anywhere
1869
1869
-- within the second.
1870
1870
--
1871
1871
-- In (unlikely) bad cases, this function's time complexity degrades
0 commit comments