Document lazy init
--HG--
extra : convert_revision : db77f1b5f4d3ff9467bce7879982ebbb0940b9f0
commit5f86c6836a5ee40e419f6b2b3f146a98f2ef9a1a
authorBryan O'Sullivan <bos@serpentine.com>
dateTue 3 Mar 2009, 00:18 (18 years ago)
parent8396390
Data/Text/Lazy.hs+2
@@ -265,6 +265,8 @@ tail Empty = emptyError "tail"
265265 unstream (S.tail (stream t)) = tail t
266266 #-}
267267
268+-- | /O(1)/ Returns all but the last character of a 'Text', which must
269+-- be non-empty. Subject to array fusion.
268270init :: Text -> Text
269271init (Chunk t0 ts0) = go t0 ts0
270272 where go t (Chunk t' ts) = Chunk t (go t' ts)