@@ -851,6 +851,14 @@ takeP lim (Parser pstep pinitial pextract) = Parser step initial extract
851851 -- XXX This should error out?
852852 -- If designed properly, this will probably error out.
853853 -- "pextract" should error out
854+ --
855+ -- By Harendra,
856+ --
857+ -- This is a tricky case, we have the following options:
858+ -- 1. Done 0 with extract as you have written
859+ -- 2. Done n, will require buffering elements
860+ -- 3. Use a backtracking fold and not a parser, once we have
861+ -- backtracking in folds
854862 else Done 0 <$> pextract s
855863 Partial n s -> do
856864 let taken = cnt1 - n