net neigh13 x =

x,

dp x,

dp (dp x);

net neigh33 x =

neigh13 x,

neigh13 (dl x),

neigh13 (dl (dl x));

net (o11,o12,o13),

(o21,o22,o23),

(o31,o32,o33)

= neigh33 i;

net neigh13 x =

x,

dp x,

dp (dp x);

net neigh33 x =

neigh13 x,

neigh13 (dl x),

neigh13 (dl (dl x));

net (o11,o12,o13),

(o21,o22,o23),

(o31,o32,o33)

= neigh33 i;

This program shows how to use wiring functions to build networks of actors.

Two wiring functions are defined : neigh13 and neigh33. The former takes a wire and produces a bundle of three wires representing the 1x3 neighborhood of the input stream, by applying twice the dp actor (one-pixel delay). The latter takes a wire and produces a bundle of nine wires representing the 3x3 neighborhood of the input stream, by applying the previously defined neigh13 function and the dl actor (one-line delay).