]> gitweb.factorcode.org Git - factor.git/blob - extra/delegate/protocols/protocols.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / 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
4 prettyprint.sections io definitions kernel continuations
5 listener ;
6 IN: delegate.protocols
7
8 PROTOCOL: sequence-protocol
9     clone clone-like like new-sequence new-resizable nth
10     nth-unsafe set-nth set-nth-unsafe length set-length
11     lengthen ;
12
13 PROTOCOL: assoc-protocol
14     at* assoc-size >alist set-at assoc-clone-like
15     { assoc-find 1 } delete-at clear-assoc new-assoc
16     assoc-like ;
17
18 PROTOCOL: input-stream-protocol
19     stream-read1 stream-read stream-read-partial stream-readln
20     stream-read-until stream-read-quot ;
21
22 PROTOCOL: output-stream-protocol
23     stream-flush stream-write1 stream-write stream-format
24     stream-nl make-span-stream make-block-stream
25     make-cell-stream stream-write-table ;
26
27 PROTOCOL: definition-protocol
28     where set-where forget uses
29     synopsis* definer definition ;