LearnRxSwift icon indicating copy to clipboard operation
LearnRxSwift copied to clipboard

swfit3.0 不是去掉了柯里化?

Open IT-ZhongPeng opened this issue 8 years ago • 3 comments

swfit3.0 的什么时间更新呀, 大神

IT-ZhongPeng avatar Apr 05 '17 06:04 IT-ZhongPeng

Swift 3 并没有去掉柯里化,只是去掉了那种 func foo()() 的写法,您可以通过返回一个闭包完成柯里化的需求,代码大概如下

func foo(firstValue: Int) -> (Int) -> (Int) {
  return { secondValue in
    return firstValue + secondValue
  }
}

dianqk avatar Apr 05 '17 09:04 dianqk

这个 repo 暂无更新计划,您可以转到 https://github.com/DianQK/rx-sample-code repo 中,里面包含了我写的各种场景下应用的 demo 。

dianqk avatar Apr 05 '17 09:04 dianqk

谢谢 这两天有时间好好读一下您的文章。

IT-ZhongPeng avatar Apr 07 '17 06:04 IT-ZhongPeng