Hi,
Thank you for your question.
As a Scala constructor, Apply takes 1 to 5 Elements as arguments and returns an Element. For example,
Apply(Flip(0.3), Flip(0.4), (b1: Boolean, b2: Boolean) => b1 && !b2)
takes two Element[Boolean]s and a function (Boolean, Boolean) => Boolean and returns an Element[Boolean].
However, the best way to think about an element is as a random process. What the Element[Boolean] that is returned by this Apply represents is this:
The process of taking the *values* produced by the two argument elements, applying the given function to them, and returning the result.
So the process defined by the Apply can be understood as taking Scala values and returning a Scala value.
In contrast, the function in a Chain returns an element, and the corresponding process is more complex.
Does this help?
Thanks,
Avi
|