最近『プログラミングElixir』を読んでいるのですが、パイプ演算子がすごくいい感じだったので Swift でも同じようなことができないかと思って実装してみました。 先に結果を書くと、こういう感じでそれっぽいことができました。 precedencegroup PipePrecedence { associativity: left higherThan: AssignmentPrecedence lowerThan: TernaryPrecedence } infix operator |>: PipePrecedence func |> <Input, Output> (lhs: Input, rhs: (Input) -> Output) -> Output { return rhs(lhs) } // 普通ver let storyboardName = storyboardName