柯里化
这个可以用来量产相似方法,避免写很多重复代码,也方便今后的维护。
柯里化--两个数相加
从右边Int->Int可知返回的是函数(闭包)并且该函数的返回值是Int类型

下面是两个数大小的比较

柯里化改造target-action
从右边Int->Int可知返回的是函数(闭包)并且该函数的返回值是Int类型
下面是两个数大小的比较
柯里化改造target-action
本文标题:swift进阶开始
本文链接:https://www.haomeiwen.com/subject/dslguttx.html
网友评论