scala - What exactly ~> operator means in Spray.io? -


reading through code, can't understand meaning of operator. appreciated!

see file: https://github.com/spray/spray/blob/master/spray-httpx/src/main/scala/spray/httpx/transformerpipelinesupport.scala

it custom operator in spray similar function1.andthen used compose functions bit more convenient when used futures. supports chaining these 3 types of functions:

  • a => b , b => c a => c (same andthen)
  • a => future[b] , b => c a => future[c] (similar future.map)
  • a => future[b] , b => future[c] a => future[c] (similar future.flatmap)

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -