没有合适的资源?快使用搜索试试~ 我知道了~
swift-overture:function函数组合库
共54个文件
swift:35个
xcscheme:4个
md:2个
需积分: 5 0 下载量 124 浏览量
2021-04-12
18:15:23
上传
评论
收藏 72KB ZIP 举报
温馨提示
:musical_score: 序曲 函数组成的库。 目录 常问问题 安装 :musical_notes: 序幕 有兴趣了解更多吗? 执照 动机 我们一直在使用函数,但是函数的组成隐藏在视线中! 例如,当我们使用高阶方法时(例如在数组上map ,我们可以使用函数: [ 1 , 2 , 3 ]. map { $0 + 1 } // [2, 3, 4] 如果我们想修改此简单的闭包以在增加值后平方我们的值,事情就会开始变得混乱。 [ 1 , 2 , 3 ]. map { ( $0 + 1 ) * ( $0 + 1 ) } // [4, 9, 16] 函数使我们能够识别和提取可重用的代码。 让我们定义几个组成以上行为的函数。 func incr ( _ x : Int ) -> Int { return x + 1 } func square ( _ x : Int ) -> Int { return x * x } 定
资源推荐
资源详情
资源评论
收起资源包目录
swift-overture-main.zip (54个子文件)
swift-overture-main
project.yml 659B
Overture.podspec 881B
.github
workflows
ci.yml 390B
Overture.playground
Pages
URLRequest Setters - Mutable.xcplaygroundpage
Contents.swift 669B
Basics.xcplaygroundpage
Contents.swift 1KB
UIKit Setters.xcplaygroundpage
Contents.swift 1KB
URLRequest Setters - Immutable.xcplaygroundpage
Contents.swift 705B
contents.xcplayground 347B
Contents.o 52KB
LICENSE 1KB
Overture.xcworkspace
contents.xcworkspacedata 348B
xcshareddata
IDEWorkspaceChecks.plist 238B
Sources
Overture
Combining.swift 832B
Flip.swift 5KB
Compose.swift 3KB
Update.swift 2KB
ZipResult.swift 5KB
Curry.swift 35KB
Uncurry.swift 7KB
With.swift 378B
ZipSequence.swift 20KB
KeyPath.swift 5KB
Result.swift 809B
Concat.swift 6KB
Pipe.swift 3KB
Chain.swift 7KB
Setters.swift 3KB
Zurry.swift 714B
ZipOptional.swift 3KB
Optional.swift 1KB
Sequence.swift 1KB
Package.swift 576B
Overture.xcodeproj
project.xcworkspace
contents.xcworkspacedata 135B
project.pbxproj 68KB
xcshareddata
xcschemes
Overture_tvOS.xcscheme 4KB
Overture_watchOS.xcscheme 4KB
Overture_iOS.xcscheme 4KB
Overture_macOS.xcscheme 4KB
.gitignore 1KB
Makefile 605B
Tests
OvertureTests
ChainTests.swift 9KB
CurryTests.swift 4KB
ZipTests.swift 11KB
PipeTests.swift 2KB
ComposeTests.swift 2KB
WithTests.swift 2KB
FlipTests.swift 301B
SettersTests.swift 2KB
UncurryTests.swift 397B
ConcatTests.swift 2KB
KeyPathTests.swift 2KB
CODE_OF_CONDUCT.md 3KB
Info.plist 701B
README.md 14KB
共 54 条
- 1
资源评论
皮卡学长
- 粉丝: 76
- 资源: 4622
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功