我试图将之前遇到的 haskell 示例转换为 scalaz。原来的例子是这样的:
("Answer to the ", (*)) <*> ("Ultimate Question of ", 6) <*> ("Life, the Universe, and Everything", 7)
据我所知,它使用了这个实例。
它不会从字面上转换为 scalaz:
scala> ("Answer to the ", ((_: Int) * (_: Int)) curried) |@| ("Ultimate Question of ", 6) |@| ("Life, the Universe, and Everything", 7) tupled
res37: (java.lang.String, (Int => (Int => Int), Int, Int)) = (Answer to the Ultimate Question of Life, the Universe, and Everything,(<function1>,6,7))
虽然,我已经寻找了一个实例,它似乎在那里(再次,据我所知)。
所以,问题是:为什么它不能这样工作?或者我错过了什么/没有得到正确的?