From cbae3ca1bf1df5e69695e488f5dba0243e04578b Mon Sep 17 00:00:00 2001 From: Jasdev Singh Date: Wed, 15 May 2019 10:10:43 -0400 Subject: [PATCH] =?UTF-8?q?Adds=20Key=20Path=20Promotion=20Proposal=20and?= =?UTF-8?q?=20Implementation=20to=20Episode=200008=E2=80=99s=20Code=20Samp?= =?UTF-8?q?les=20(#20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/01-Episode.xcplaygroundpage/Contents.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/0008-getters-and-key-paths/Getters and Key Paths.playground/Pages/01-Episode.xcplaygroundpage/Contents.swift b/0008-getters-and-key-paths/Getters and Key Paths.playground/Pages/01-Episode.xcplaygroundpage/Contents.swift index b2a27ce5..05ee903f 100644 --- a/0008-getters-and-key-paths/Getters and Key Paths.playground/Pages/01-Episode.xcplaygroundpage/Contents.swift +++ b/0008-getters-and-key-paths/Getters and Key Paths.playground/Pages/01-Episode.xcplaygroundpage/Contents.swift @@ -181,4 +181,12 @@ users.sorted(by: their(^\.email, >)) users.max(by: their(^\.email.count))?.email users.min(by: their(^\.email.count))?.email + +/*: +[Greg Titus](https://twitter.com/gregtitus) and Point-Free’s own [Stephen Celis](https://twitter.com/stephencelis) +have since [pitched a Swift Evolution proposal](https://forums.swift.org/t/key-path-expressions-as-functions/19587) +and [an implementation](https://github.com/apple/swift/pull/19448) to allow `\Root.value` key path expressions +to be used wherever `(Root) -> Value` functions are applicable. +*/ + //: [See the next page](@next) for exercises!