CrossClj

0.1.12 docs

SourceDocs



RECENT

    aviary/aviary-core

    Clojars

    Mar 7, 2015


    OWNER
    Will Farrell
    @dtour-dot-life
    Providence, RI
    willfarrell.is

    Index of all namespaces


    « Project + dependencies

    Aviary core module.

    aviary.networkDocsSource
    The Network protocol is for linking nodes together to build
    processing graphs. A node is a function taking an input and an
    output channel. Data is taken from the input channel, processed,
    and put on the output channel. If a nil is returned, processing
    stops.
    
    ;; a simple node
    (node #(assoc % :hello :world))
    
    Vectors can be used to chain nodes together. Data is passed
    and sent through the nodes in order:
    
    [(node #(assoc % :hello :world)
    (node #(assoc % :hello :chuck)]
    
    Maps can be used to route data to different nodes based on a
    predicate.
    
    {odd? (node dec)
    even? (node inc)}
    
    This can be combined with a vectors to build more complicated
    graphs:
    
    ;; always increment
    [(node inc)
    ;; ...then split the data
    {odd? (node dec)
    even? (node inc)}
    ;; ...then mix the channels
    (node inc)]
    
    Happy networking.
    aviary.networkDocsSource
    The Network protocol is for linking nodes together to build
    processing graphs. A node is a function taking an input and an
    output channel. Data is taken from the input channel, processed,
    and put on the output channel. If a nil is returned, processing
    stops.
    
    ;; a simple node
    (node #(assoc % :hello :world))
    
    Vectors can be used to chain nodes together. Data is passed
    and sent through the nodes in order:
    
    [(node #(assoc % :hello :world)
    (node #(assoc % :hello :chuck)]
    
    Maps can be used to route data to different nodes based on a
    predicate.
    
    {odd? (node dec)
    even? (node inc)}
    
    This can be combined with a vectors to build more complicated
    graphs:
    
    ;; always increment
    [(node inc)
    ;; ...then split the data
    {odd? (node dec)
    even? (node inc)}
    ;; ...then mix the channels
    (node inc)]
    
    Happy networking.