scaleex-scale.html
doubleCode_samples.html
mergeex-merge.html
sumex-sum.html
dxex-dx.html
wiring functionsex-msfl.html
histoex-histo.html
RLEex-rle.html
convolex-conv.html
higher order
actor
 

actor fmap (f:signed<s> -> signed<s>)

  in (i:signed<s>)

  out (o:signed<s>)

rules

| i:x -> o:f(x)

;

This actor is a higher order actor, i.e. an actor taking a function as parameter. Here the function is simply applied to each input token.

If the stream on input i is : x1 x2 x3 ...

then the stream on output o will be :  f(x1) f(x2) f(x3) ...


The function parameter will be set when instanciating the actor at the network level, by writing, for example


function inc x = x+1 : signed<8> -> signed<8>;

...

net y x = fmap inc x