Module type Interfaces.SINK

Interface for a sink of items.

type item

Type of items to be received by the sink.

type t

t A sink for items.

val needs_more : t -> bool

needs_more s Is the sink s able to accept more items?

val put : item -> t -> t

put item sink Put the item to the sink.

Precondition: needs_more sink.

val put_end : t -> t

put_end sink signals to the sink that there are no more items coming.