Open bsless opened 2 years ago
Feel free to use this alternative representation in the documentation, too, if you'd like
Specs for :flow/notifier
:flow/terminator
:flow/iterator
:flow/flow
are correct but keep in mind they're not pure functions, and side effects are not encoded by the spec.
The producer and the consumer do not represent concrete objects, therefore I don't think it makes sense to reason about them in terms of types. The producer is the process logic encapsulated by the flow, and the consumer is the process logic actually running the flow.
Try to define a flow in the repl, then call this flow as a function. You are the consumer, deref
the iterator and observe how the producer reacts.
(def flow (m/seed (range 3)))
(def it (flow #(prn :notify) #(prn :terminate))) ;; prints :notify
@it ;; prints :notify, returns 0
@it ;; prints :notify, returns 1
@it ;; prints :terminate, returns 2
Hello,
In trying to understand missionary, I have followed your recommendation to go over the task and flow specifications first. I thought perhaps trying to formalize them or rephrase them might help me understand them better.
The comments are taken almost verbatim from the spec in the readme. Does the spec look correct?