Permalink
Browse files

dsl renaming

  • Loading branch information...
1 parent 56a56fa commit 6f56f3a8f2c35bf1e25a9e71016077e01798dfc8 @mariusdanciu committed Jan 15, 2012
@@ -16,7 +16,7 @@ object Main extends App {
NettyServer.start(8080, new ShiftApplication {
def rules: List[Rule] = {
- (fullPath("/a/b/c") or POST to abcService) :: Nil
+ (fullPath("/a/b/c") or POST then abcService) :: Nil
}
})
@@ -24,7 +24,7 @@ trait Combinators[M[_]] {
}
trait CombinatorsView[A, B, M[_]] {
- def to[C](g: B => M[C]): A => M[C]
+ def then[C](g: B => M[C]): A => M[C]
def or(f: A => M[B]): A => M[B]
}
@@ -45,7 +45,7 @@ object OptionMonad extends Monad[Option] with Combinators[Option] {
}
class OptionCombinatorsView[A, B](f: A => Option[B]) extends CombinatorsView[A, B, Option] {
- def to[C](g: B => Option[C]): A => Option[C] =
+ def then[C](g: B => Option[C]): A => Option[C] =
OptionMonad.>=>(f)(g)
def or(g: A => Option[B]): A => Option[B] =
OptionMonad.>|>(f)(g)

0 comments on commit 6f56f3a

Please sign in to comment.