on master help sign in
add comments
commit0d43a94530048d081a04f034d79a62d804a88a8d authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 13 Nov 2019, 16:24 (7 years ago) parent9ef94b0
1 file changed+4
examples/Split.hs+4
examples/Split.hs+4
@@ -25,6 +25,10 @@ newHandle = do
2525 put (Just (h, idx))
2626 return h
2727
28+-- XXX reduce the input stream to a stream of file names
29+-- The fold can return the file name/handle after it is done.
30+-- similarly the files can written to directories and we can generate a stream
31+-- of directory names.
2832splitFile :: FH.Handle -> IO ()
2933splitFile inHandle =
3034 S.unfold FH.read inHandle