factor/basis/delegate/protocols/protocols.factor

28 lines
900 B
Factor
Raw Normal View History

! Copyright (C) 2007 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
2008-05-10 01:16:46 -04:00
USING: delegate sequences.private sequences assocs
io io.styles definitions kernel continuations ;
IN: delegate.protocols
PROTOCOL: sequence-protocol
2008-05-10 01:16:46 -04:00
clone clone-like like new-sequence new-resizable nth
nth-unsafe set-nth set-nth-unsafe length set-length
lengthen ;
PROTOCOL: assoc-protocol
2008-05-10 01:16:46 -04:00
at* assoc-size >alist set-at assoc-clone-like
2008-06-09 06:22:21 -04:00
delete-at clear-assoc new-assoc assoc-like ;
2008-05-05 04:51:41 -04:00
PROTOCOL: input-stream-protocol
2008-05-09 17:38:27 -04:00
stream-read1 stream-read stream-read-partial stream-readln
stream-read-until ;
2008-05-05 04:51:41 -04:00
PROTOCOL: output-stream-protocol
stream-flush stream-write1 stream-write stream-format
2008-05-09 17:38:27 -04:00
stream-nl make-span-stream make-block-stream
2008-02-09 22:34:42 -05:00
make-cell-stream stream-write-table ;
PROTOCOL: definition-protocol
2008-04-04 10:17:33 -04:00
where set-where forget uses
synopsis* definer definition ;