CrossClj

0.7.9 docs

SourceDocs



RECENT
    VARS
    fiber-transform
    filter
    fn->guava-fn
    fn->guava-pred
    fn->SuspendableAction2
    group
    map
    mapcat
    snd-filter
    snd-map
    snd-mapcat
    zip

    « Index of all namespaces of this project

    Functions transform channels
    
    (fiber-transform in out f)
    Spawns a fiber that runs the supplied function f, which is passed the
    supplied receive-port in and send-port out
    (filter pred ch)
    Creates a receive-port (a read-only channel) that filters messages that satisfy the predicate pred
    from the given channel ch.
     All messages (even those not satisfying the predicate) will be consumed from the original channel;
     those that don't satisfy the predicate will be silently discarded.
    Private
    (fn->guava-fn f)
    Private
    (fn->guava-pred p?)
    Private
    (fn->SuspendableAction2 f)
    (group ports)(group port & ports)
    Creates a receive-port (a read-only channel) from a group of channels.
    Receiving a message from the group will return the next message available from
    any of the channels in the group.
    A message received from the group is consumed (removed) from the original member
    channel to which it has been sent.
    (map f ch)
    Creates a receive-port (a read-only channel) that receives messages that are transformed by the
    given mapping function f from a given channel ch.
    (mapcat f ch)
    Creates a receive-port (a read-only channel) that receives messages that are transformed by the
    given mapping function f from a given channel ch.
    
    Unlike map, the mapping function may return a single value, a sequence of values or a channel, and
    in all cases the values contained in the sequence/channel will be received one at a time by the returned
    receive-port.
    (snd-filter pred ch)
    Returns a channel that filters messages that satisfy the predicate pred before sending to the given channel ch.
    Messages that don't satisfy the predicate will be silently discarded when sent.
    (snd-map f ch)
    Returns a channel that transforms messages by applying the given mapping function f
    before sending them to the given channel ch.
    (snd-mapcat f ch pipe)
    Creates a send-port that sends messages that are transformed by the
    given mapping function f from a given channel ch.
    
    Unlike map, the mapping function may return a single value, a sequence of values or a channel, and
    in all cases the values contained in the sequence/channel will be sent one at a time to the channel.
    receive-port. If multiple producers write to the channel, the messages received from the mapped
    collections/channels may be interleaved with messages produced by other producers.
    
    The pipe parameter is an intermediate channel used by the operation.
    (zip c & cs)
    Creates a receive-port (a read-only channel) that combines messages from the given channels
    into a single combined vector message.