Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

dsl renaming

  • Loading branch information...
commit 6f56f3a8f2c35bf1e25a9e71016077e01798dfc8 1 parent 56a56fa
@mariusdanciu authored
View
2  examples/demo/src/main/scala/net/shift/demo/Demo.scala
@@ -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
}
})
View
4 shift-common/src/main/scala/net/shift/common/FunctionalDefs.scala
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.