let fold_channel ?(strict=true) f init cin =
    fold_stream ~strict f init (Stream.of_channel cin)