• scala pipe operator |>
    Code

    Scala pipe operator „|>”

    Scala pipe operator „|>” passes the result of the left side to the right side method/function as the first argument. t is, one might argue, „yet another arrow”, that provides „something” to be put „somewhere”. This is absolutely true but in addition it provides readability. Scala pipe operator „|>” source code It is just a simple fancy looking generic function : IThis operator shines if Your code at least tries to follow rules written down by Uncle Bobo and his clean code mentality. This allows you to chain function calls in a more natural left-to-right order, which can sometimes be more readable than nested function calls. Just don`t get overboard…

Piotr Kowalski