Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- infix operator |>: AdditionPrecedence
- public func |> <T,U>(lhs: T, rhs: (T) -> U) -> U {
- return rhs(lhs)
- }
- public func |> <T>(lhs: T, rhs: inout T) {
- rhs = lhs
- }
- infix operator <|: AdditionPrecedence
- public func <| <T>(lhs: T, rhs:(T) -> Void) -> T {
- rhs(lhs)
- return lhs
- }
- UILabel()
- <| {"pipe" |> $0.text}
- <| {$0.sizeToFit()}
- |> self.view.addSubview
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement