On Fri, Dec 19, 2008 at 6:31 AM, Paul L
<ninegua@gmail.com> wrote:
Nice to see this discussion, and I just want to comment on the
applicative v.s. arrow style. The example Henrik gave is
z <- sf2 <<< sf1 -< x
which models a composition, and is in general the strength of a
combinator approach. But the strength of Applicative, in my opinion,
is not composition but currying:
f <*> x <*> y
where f can have the type Behavior a -> Behavior b -> Behavior c. I
don't think there is an exact match in arrows. One could, however,
require sf to be of type SF (a, b) c, and write
z <- sf -< (x, y)
The tupling may seem an extra burden, but it's an inherent design
choice of arrows, which builds data structure on top of products, and
people can't run away from it when writing arrow programs.
--
Regards,
Paul Liu
Yale Haskell Group
http://www.haskell.org/yale