Skip to content

Commit

Permalink
sink shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
timmy committed Mar 18, 2010
1 parent 76bb4f3 commit 449ca06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/stream.slate
Expand Up @@ -268,14 +268,17 @@ s@(WriteStream traits) ; c
s
].

source@(Stream traits) >> sink
source@(Stream traits) >> sink@(WriteStream traits)
"Write the contents from source to target one element at a time."
[
[source isAtEnd]
whileFalse: [sink nextPut: source next].
sink
].

source@(Stream traits) >> sink
[source >> sink writer].

sink@(Stream traits) << source
[source >> sink].

Expand Down

0 comments on commit 449ca06

Please sign in to comment.