on master help sign in
Fix doco for drop
12df873Bryan O'Sullivan
Data/Text.hs+2−2
@@ -774,8 +774,8 @@ take n t@(Text arr off len)
774 #-}
774 #-}
775
775
776-- | /O(n)/ 'drop' @n@, applied to a 'Text', returns the suffix of the
776-- | /O(n)/ 'drop' @n@, applied to a 'Text', returns the suffix of the
777−-- 'Text' of length @n@, or the empty 'Text' if @n@ is greater than the
777+-- 'Text' after the first @n@ characters, or the empty 'Text' if @n@
778−-- length of the 'Text'. Subject to fusion.
778+-- is greater than the length of the 'Text'. Subject to fusion.
779drop :: Int -> Text -> Text
779drop :: Int -> Text -> Text
780drop n t@(Text arr off len)
780drop n t@(Text arr off len)
781 | n <= 0 = t
781 | n <= 0 = t
Data/Text/Fusion/Common.hs+2−2
@@ -662,8 +662,8 @@ take n0 (Stream next0 s0 len) =
662{-# INLINE [0] take #-}
662{-# INLINE [0] take #-}
663
663
664-- | /O(n)/ drop n, applied to a stream, returns the suffix of the
664-- | /O(n)/ drop n, applied to a stream, returns the suffix of the
665−-- stream of length @n@, or the empty stream if @n@ is greater than the
665+-- stream after the first @n@ characters, or the empty stream if @n@
666−-- length of the stream.
666+-- is greater than the length of the stream.
667drop :: Integral a => a -> Stream Char -> Stream Char
667drop :: Integral a => a -> Stream Char -> Stream Char
668drop n0 (Stream next0 s0 len) =
668drop n0 (Stream next0 s0 len) =
669 Stream next (J n0 :*: s0) (len - fromIntegral (max 0 n0))
669 Stream next (J n0 :*: s0) (len - fromIntegral (max 0 n0))
Data/Text/Lazy.hs+2−2
@@ -724,8 +724,8 @@ take i t0 = take' i t0
724 #-}
724 #-}
725
725
726-- | /O(n)/ 'drop' @n@, applied to a 'Text', returns the suffix of the
726-- | /O(n)/ 'drop' @n@, applied to a 'Text', returns the suffix of the
727−-- 'Text' of length @n@, or the empty 'Text' if @n@ is greater than the
727+-- 'Text' after the first @n@ characters, or the empty 'Text' if @n@
728−-- length of the 'Text'. Subject to fusion.
728+-- is greater than the length of the 'Text'. Subject to fusion.
729drop :: Int64 -> Text -> Text
729drop :: Int64 -> Text -> Text
730drop i t0
730drop i t0
731 | i <= 0 = t0
731 | i <= 0 = t0