Rog*_*rge 3 functional-programming scala
Scala 编程语言中的符号 :+: 是什么意思?
object Devices {
private[endpoints] def endpoints(myService: MyService[Future], pService: PService[Future]) =
"devices" / (
banDevice(myService, pService) :+:
unbanDevice(myService, pService)
)
Run Code Online (Sandbox Code Playgroud)
这是代码片段。我正在使用 finagle 库。
Scala 没有此函数,它可以位于您正在使用的库之一内。根据您的代码,您可能正在使用 finagle !
因此 Peter Neyens 指出: https: //github.com/finagle/finch/blob/master/docs/endpoint.md#coproduct-endpoints。
似乎解释了你想找出什么。
Ps:它只是其中一个库中的一种方法,仅此而已。