0.11.6
- Bugfix: disjunction
- Bugfix:
.map
was not storing the mapped value (in the internal state)
The value of the disjunction was not stored (in the internal state), thus a disjunction would not
match multiple times in a row (even if the resulting values were different).
An example that would show this behavior:
(pathEnd.map(_ => true) | path("page-1").map(_ => false)) { isIndex =>
render(Page(isIndex))
}
- API: new combinators for directives
.some
– transforms aDirective[A]
into aDirective[Option[A]]
(withSome(_)
value).none
– transforms aDirective[A]
into aDirective[Option[A]]
(withNone
value).mapOption
– transforms aDirective[Option[A]]
into aDirective[Option[B]]
(applying the provided function to theOption
)