on master help sign in
Fix the documentation of parseMany
commitfaa0c2bdf58401c60b6043b10ffe85ebadc41f24 authorHarendra Kumar <harendra@composewell.com> dateWed 7 Dec 2022, 19:20 (4 years ago) parentff1c3ad
1 file changed+3−3
core/src/Streamly/Internal/Data/Stream/Reduce.hs+3−3
core/src/Streamly/Internal/Data/Stream/Reduce.hs+3−3
@@ -325,15 +325,15 @@ splitOnAny _subseq _f _m =
325325-- | Apply a 'Parser' repeatedly on a stream and emit the parsed values in the
326326-- output stream.
327327--
328−-- This is the streaming equivalent of the 'Streamly.Internal.Data.Parser.many'
329−-- parse combinator.
328+-- Example:
330329--
331330-- >>> s = Stream.fromList [1..10]
332331-- >>> parser = Parser.takeBetween 0 2 Fold.sum
333332-- >>> Stream.fold Fold.toList $ Stream.parseMany parser s
334333-- [Right 3,Right 7,Right 11,Right 15,Right 19]
335334--
336−-- foldMany f = Stream.parseMany (Parser.fromFold f)
335+-- This is the streaming equivalent of the 'Streamly.Data.Parser.many' parse
336+-- combinator.
337337--
338338-- Known Issues: When the parser fails there is no way to get the remaining
339339-- stream.