scalaz / scalaz-analytics

A high-performance, purely-functional library for doing computational analysis and statistics over data in a type-safe way
Apache License 2.0
64 stars 17 forks source link

Implement Arrow Ops #5

Open camjo opened 6 years ago

camjo commented 6 years ago

We need to add the Arrow Ops to the =>: and StdLib traits as mentioned in the design session.

=>: is a Strong/Choice Profunctor. The best links I've found to describe this are: https://elvishjerricco.github.io/2017/03/10/profunctors-arrows-and-static-analysis.html https://github.com/typelevel/cats/tree/master/core/src/main/scala/cats/arrow

camjo commented 6 years ago

Note that Arrow in scalaz 7.x is not something we can leverage unfortunately because of the method arr which allows you to lift arbitrary functions into the Arrow. Whilst this is generally useful this breaks the guarantees that our library is trying to provide. I'm hoping that the scalaz 8 abstractions allow us to use them directly.

afsalthaj commented 6 years ago

@camjo Out of curiosity, the problem with using with existing arrow implementations is the existence of arr in scalaz / lift in cats?

camjo commented 6 years ago

@afsalthaj precisely. We want to control the user code so that we can reify it but if they can lift arbitrary functions we can't do this