For *some* of the XxxFunction traits, I have sat on the fence and
mixed them into object Scalaz.
object Scalaz extends StateTFunctions with ...
We could mix a few more into object Scalaz. Perhaps better, we could
create object ScalazMigrate with a reconstruction of the old API,
adorned with @deprecation messages that point to the new homes.
object ScalazMigrate {
@deprecated("use Equal.equalFromToString", "7.0")
val equalA[A](...) = Equal.equalFromToString(...)
}
Regarding State, you made a compelling argument in favour of the
flipped type arguments [1]. I'm not too bothered either way.
Requiring an explicit importing instances for Iterable is by design,
for the reasons you mention. Needs to be documented better, though.
val howManySharesInTypesafeIJustBought = 100val myCurrentHoldings = findMyHoldings // a Pair (Int, Int) representing on the left, shares I have short and on the right, shares I ownval (_, newLongPosition) = myCurrentHoldings map (_ + howManySharesInTypesafeIJustBought)
--
You received this message because you are subscribed to the Google Groups "scalaz" group.
To post to this group, send email to sca...@googlegroups.com.
To unsubscribe from this group, send email to scalaz+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scalaz?hl=en.
-- Tony Morris http://tmorris.net/
val howManySharesInTypesafeIJustBought = 100val myCurrentHoldings = findMyHoldings // a Pair (Int, Int) representing on the left, shares I have short and on the right, shares I ownval (_, newLongPosition) = myCurrentHoldings map (_ + howManySharesInTypesafeIJustBought)
Sadness will ensue
On Wed, May 16, 2012 at 2:13 PM, Runar Bjarnason <runar...@gmail.com> wrote:
No. Why?
--
You received this message because you are subscribed to the Google Groups "scalaz" group.
To post to this group, send email to sca...@googlegroups.com.
To unsubscribe from this group, send email to scalaz+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scalaz?hl=en.
--
You received this message because you are subscribed to the Google Groups "scalaz" group.
To post to this group, send email to sca...@googlegroups.com.
To unsubscribe from this group, send email to scalaz+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scalaz?hl=en.
Runar
--
You received this message because you are subscribed to the Google Groups "scalaz" group.
To post to this group, send email to sca...@googlegroups.com.
To unsubscribe from this group, send email to scalaz+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scalaz?hl=en.
Sure, but whether to choose left or right bias is arbitrary,
scala> val v = ("a", "1") map (_.parseInt)v: (java.lang.String, scalaz.Validation[NumberFormatException,Int]) = (a,Success(1))scala> v.sequence[({type l[a]=Validation[Exception, a]})#l, Int]res1: scalaz.Validation[java.lang.Exception,(java.lang.String, Int)] = Success((a,1))
scala> ("a", "1").traverse[({type l[a]=Validation[Exception, a]})#l, Int](_.parseInt)res11: scalaz.Validation[java.lang.Exception,(java.lang.String, Int)] = Success((a,1))
True indeed.
As it stands, everything on top of scalaz must now also change to use variance annotations. I am unconvinced this is a good idea.
Changed or moved functionality, or different types: