
On 6/13/22 10:06, PICCA Frederic-Emmanuel wrote:
I would like to combine Producers in order to create a Producer of another type whcih combine these values
I want a Producer of the 'A' type
data A :: A a b
by I have a Producer of 'a' values and another on of 'b' values. what is the best way to create from thoses two producers a Producer of 'A' ? Is ther a Generic way to automatically generate these combine Producers. In my programmes, I will have plenty of these combine Producers.
The intuitive thing I would try is to use Applicative i.e. A <$> a_producer <*> b_producer but I haven't tested if it works with pipes. Cheers Ben -- I would rather have questions that cannot be answered, than answers that cannot be questioned. -- Richard Feynman