Advertisement
eallik

Untitled

Jan 7th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.30 KB | None | 0 0
  1. new Applicative[JsResult] {
  2.     override def point[A](t: => A) = jsSuccess(t)
  3.  
  4.     override def ap[A,B](fa: => JsResult[A])(f: => JsResult[A => B]) =
  5.       f match {
  6.         case JsSuccess(f, path) => fa.map(f)  // XXX: is it correct to ignore path?
  7.         case JsError(x) => JsError(x)
  8.       }
  9.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement