Skip to content

Instantly share code, notes, and snippets.

@kell18
Created April 18, 2016 18:43
Show Gist options
  • Save kell18/36797974d652d2b3b7fd351cb24e1a5f to your computer and use it in GitHub Desktop.
Save kell18/36797974d652d2b3b7fd351cb24e1a5f to your computer and use it in GitHub Desktop.
Intellij Idea highlighting error (scala, cats 0.4.1)
import cats.data.Validated.{invalid, valid}
import cats.std.all._
import cats.syntax.cartesian._
object Boot extends App {
val a = (valid[String, String]("event 1 ok") |@| // does not recognise `|@|` - applicative combine syntax
invalid[String, String]("event 2 failed!") |@|
invalid[String, String]("event 3 failed!")) map {_ + _ + _}
println(a)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment