Arrows are often described as generalization of functions (statically generated functions only, i.e. there's no support for partial application / closures). However, at least looking at Arrows as they are modeled in Haskell, I can't see how they can generalize functions of multiple arguments that return a single result (a result that in general might not be a tuple). I'm trying to envision how using just the arrows interface one could arrive at a composition of arrows that produces a single result that in general might not be a tuple. Is there a way to do this or is this a deliberate limitation on the power of the Arrow type?
From what I understand arrows provide the ability to compose static (possibly parallel) pipelines but they can't 'fold' the tuples of outputs into a single final result. Am wrong or I missing something?
ArrowApply
? – Daniel Wagnerinstance Arrow (->)
) it is clear that arrows generalize functions. So what does "true generalization" mean? What would have to be the case for arrows to be a "true" generalization of functions? – Daniel WagnerArrow (a,b) c
and compose away. I thought this was cheating in a sense because it depends on lifting a certain kind of function (one that takes a tuple) into the Arrow but I guess that's not really a problem. – Dr DR