]> gitweb.factorcode.org Git - factor.git/blob - basis/delegate/protocols/protocols.factor
92f9387130a58c4fb0465ef31d3e8017b50e347d
[factor.git] / basis / delegate / protocols / protocols.factor
1 ! Copyright (C) 2007 Daniel Ehrenberg
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: delegate sequences.private sequences assocs io ;
4 IN: delegate.protocols
5
6 PROTOCOL: sequence-protocol
7 like new-sequence new-resizable nth nth-unsafe
8 set-nth set-nth-unsafe length set-length
9 lengthen ;
10
11 PROTOCOL: assoc-protocol
12 at* assoc-size >alist set-at assoc-clone-like
13 delete-at clear-assoc new-assoc assoc-like ;
14
15 PROTOCOL: input-stream-protocol
16 stream-peek1 stream-peek stream-read1 stream-read
17 stream-read-partial stream-readln
18 stream-read-until ;
19
20 PROTOCOL: output-stream-protocol
21 stream-flush stream-write1 stream-write stream-nl ;