From e11cf00f529c82b2c0feb06f891d087d869184fb Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Sun, 31 Jan 2021 00:28:16 +0100 Subject: [PATCH] Update README.md --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e1af82d..7f18659 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,19 @@ Simplify writing to multiple streams at once. ## Usage +Construct a tee stream by wrapping multiple writable IO objects: ```julia tee = TeeStream(io::IO...) +write(tee, ....) +close(tee) # calls close on all wrapped io ``` -Construct a tee stream by wrapping multiple writable IO objects. - +Construct a tee stream by wrapping multiple writable IO objects, +call function `f` on the tee, and automatically calls `close` on +all IO streams: ```julia TeeStream(f::Function, io::IO...) do tee - # ... + write(tee, ...) end ```