on master help sign in
Update docs for unlines and unwords
00d3cb5Harendra Kumar
src/Streamly/Internal/Unicode/Stream.hs+8
@@ -897,6 +897,10 @@ words = S.wordsBy isSpace
897-- | Unfold a stream to character streams using the supplied 'Unfold'
897-- | Unfold a stream to character streams using the supplied 'Unfold'
898-- and concat the results suffixing a newline character @\\n@ to each stream.
898-- and concat the results suffixing a newline character @\\n@ to each stream.
899--
899--
900+-- @
901+-- unlines = Stream.interposeSuffix '\n'
902+-- @
903+--
900-- /Internal/
904-- /Internal/
901{-# INLINE unlines #-}
905{-# INLINE unlines #-}
902unlines :: (MonadIO m, IsStream t) => Unfold m a Char -> t m a -> t m Char
906unlines :: (MonadIO m, IsStream t) => Unfold m a Char -> t m a -> t m Char
@@ -906,6 +910,10 @@ unlines = S.interposeSuffix '\n'
906-- 'Unfold' and concat the results with a whitespace character infixed between
910-- 'Unfold' and concat the results with a whitespace character infixed between
907-- the streams.
911-- the streams.
908--
912--
913+-- @
914+-- unwords = Stream.interpose ' '
915+-- @
916+--
909-- /Internal/
917-- /Internal/
910{-# INLINE unwords #-}
918{-# INLINE unwords #-}
911unwords :: (MonadIO m, IsStream t) => Unfold m a Char -> t m a -> t m Char
919unwords :: (MonadIO m, IsStream t) => Unfold m a Char -> t m a -> t m Char