We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我看到翁阳的Swift改善既有代码的设计中得自定义操作符,这一部分看不懂,可以解释下吗?
The text was updated successfully, but these errors were encountered:
这样子应该好理解一些
func |>(lhs: AsyncTask, rhs: Action) -> AsyncTask { return { (action: Action) in let block: Action = { rhs() action() } lhs(block) } } func |>(lhs: AsyncTask, rhs: Action) -> Action { return { lhs( rhs ) } } func |>(lhs: AsyncTask, rhs: AsyncTask) -> AsyncTask { return { (action: Action) in let block: Action = { rhs( action ) } lhs(block) } }
Sorry, something went wrong.
No branches or pull requests
我看到翁阳的Swift改善既有代码的设计中得自定义操作符,这一部分看不懂,可以解释下吗?
The text was updated successfully, but these errors were encountered: