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