ZipList with Scalaz
问题 Suppose I have a list of numbers and list of functions: val xs: List[Int] = List(1, 2, 3) val fs: List[Int => Int] = List(f1, f2, f3) Now I would like to use an Applicative to apply f1 to 1 , f2 to 2 , etc. val ys: List[Int] = xs <*> fs // expect List(f1(1), f2(2), f3(3)) How can I do it with Scalaz ? 回答1: pure for zip lists repeats the value forever, so it's not possible to define a zippy applicative instance for Scala's List (or for anything like lists). Scalaz does provide a Zip tag for