Skip to content

Commit c7494fb

Browse files
committed
chore: add the |> operator for pipe
1 parent 4c323a4 commit c7494fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/src/scala/util/package.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ package object util {
2525
extension[A](x: A)
2626
inline def tap(inline f: A => Unit): x.type = { f(x); x }
2727
inline def pipe[B](inline f: A => B): B = f(x)
28+
inline infix def |> [B](inline f: A => B): B = x.pipe(f)
2829
}

0 commit comments

Comments
 (0)