factor/extra/delegate/protocols/protocols.factor

26 lines
927 B
Factor
Raw Normal View History

! Copyright (C) 2007 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
USING: delegate sequences.private sequences assocs prettyprint.sections
2008-05-05 04:51:41 -04:00
io definitions kernel continuations listener ;
IN: delegate.protocols
PROTOCOL: sequence-protocol
clone clone-like like new-sequence new-resizable nth nth-unsafe
set-nth set-nth-unsafe length set-length lengthen ;
PROTOCOL: assoc-protocol
2008-04-05 03:44:54 -04:00
at* assoc-size >alist set-at assoc-clone-like { assoc-find 1 }
delete-at clear-assoc new-assoc assoc-like ;
2008-05-05 04:51:41 -04:00
PROTOCOL: input-stream-protocol
stream-read1 stream-read stream-read-until stream-read-quot ;
PROTOCOL: output-stream-protocol
stream-flush stream-write1 stream-write stream-format
stream-nl make-span-stream make-block-stream stream-readln
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 ;