Permalink
Browse files

very minor stuff

  • Loading branch information...
mariusdanciu committed May 6, 2012
1 parent ef5dde1 commit 9b2f131e523e1899ca04812ef093f2ec87277f61
Showing with 3 additions and 4 deletions.
  1. +3 −4 shift-common/src/main/scala/net/shift/common/FunctionalDefs.scala
@@ -27,10 +27,8 @@ trait CombinatorsView[A, B, M[_]] {
def or(f: A => M[B]): A => M[B]
}
-/**
- * Concrete implementations
- *
- */
+// Concrete implementations
+
object OptionMonad extends Monad[Option] with Combinators[Option] {
def unit[A](a: A) : Option[A] = Some(a)
def fmap[A, B](f: A => B) : Option[A] => Option[B] =
@@ -49,3 +47,4 @@ class OptionCombinatorsView[A, B](f: A => Option[B]) extends CombinatorsView[A,
def or(g: A => Option[B]): A => Option[B] =
OptionMonad.>|>(f)(g)
}
+

0 comments on commit 9b2f131

Please sign in to comment.