scalaz
Scala: Type inference and subtypes/higher-kinded-types
I\'ve been playing around with Scalaz to get a little bit of the haskell feeling into scala. To understand how things work in scala I started implementing various algebraic structures myself and came[详细]
2023-02-09 11:28 分类:问答Scalaz validation
I\'m trying to use scalaz validation in our project and have ran into a following situation: def rate(username: String, params: Map[String, String]): ValidationNEL[String, Int] = {[详细]
2023-02-04 17:39 分类:问答scalaz Iteratees from scala Iterator
I edited the code below as I believe I had been combining the IterV objects incorrectly on top of the iter.next issue.[详细]
2023-02-02 13:51 分类:问答Basic Scalaz State question
How do I use State to mimic the behaviour of List.zipWithIndex? What I have come up with so far (which doesn\'t work) is:[详细]
2023-02-02 00:05 分类:问答Scala partially applied type constructor inference
I\'m using scala-2.8.1 and scalaz-5.0. Can anyone explain exactly why a PartialApply1Of2 can be inferrred in the one case but not in the other?[详细]
2023-02-01 06:14 分类:问答Example of using scalaz Monad
Can anybody give an example of using scalaz Monad for a simple 开发者_开发技巧but non-trivial and practically useful task ?scalaz.Monad, and the family of related type classes, abstract some common fu[详细]
2023-01-28 03:42 分类:问答Invoking a function on a "side" of a Bifunctor dependent on the value of a boolean
If I have an instance of Bifunctor[A,A] bf, a function f : A => A and a Boolean value p: def calc[A, F[_,_]: Bifunctor](p: Boolean, bf: F[A, A], f: A => A): F[A, A] = {[详细]
2023-01-24 20:05 分类:问答New to 2.8 collections. What would this signature look like? Similar to scalaz sequence
I found a blog post today that mention\'s scalaz\'s sequence function. Couldn\'t you do something as simple as:[详细]
2023-01-19 01:03 分类:问答Type inference question using Scalaz.ListW.<^>
I was p开发者_C百科laying around with ListW.<^>, the definition of which is as follows: def <^>[B: Zero](f: NonEmptyList[A] => B): B = value match {[详细]
2023-01-09 09:12 分类:问答Scalaz splitting a computation into sub-parts
I have a very large List[A] and a function f: List[A] => List[B]. I would like to split my original list into sub-lists with a maximum size, apply the function to each sublist in turn and then unsp[详细]
2022-12-30 20:28 分类:问答