From 342950d80e71eaaa809a49d907704e006bfc4f26 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Wed, 16 Jan 2019 11:38:26 -0500 Subject: [PATCH] 43 --- 0042-the-many-faces-of-flatmap-pt1/README.md | 2 +- 0043-many-faces-of-flatmap-pt2/README.md | 3 --- .../.gitignore | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../Contents.swift | 0 .../Sources/Util.swift | 0 .../contents.xcplayground | 0 .../Package.resolved | 0 .../Package.swift | 0 0043-the-many-faces-of-flatmap-pt2/README.md | 14 ++++++++++++++ .../ManyFacesOfFlatMapPt2.swift | 0 13 files changed, 15 insertions(+), 4 deletions(-) delete mode 100644 0043-many-faces-of-flatmap-pt2/README.md rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/.gitignore (100%) rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/ManyFacesOfFlatMapPt1.xcworkspace/contents.xcworkspacedata (100%) rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/ManyFacesOfFlatMapPt2.playground/Contents.swift (100%) rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/ManyFacesOfFlatMapPt2.playground/Sources/Util.swift (100%) rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/ManyFacesOfFlatMapPt2.playground/contents.xcplayground (100%) rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/Package.resolved (100%) rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/Package.swift (100%) create mode 100644 0043-the-many-faces-of-flatmap-pt2/README.md rename {0043-many-faces-of-flatmap-pt2 => 0043-the-many-faces-of-flatmap-pt2}/Sources/ManyFacesOfFlatMapPt2/ManyFacesOfFlatMapPt2.swift (100%) diff --git a/0042-the-many-faces-of-flatmap-pt1/README.md b/0042-the-many-faces-of-flatmap-pt1/README.md index ce1f3706..06cc75f3 100644 --- a/0042-the-many-faces-of-flatmap-pt1/README.md +++ b/0042-the-many-faces-of-flatmap-pt1/README.md @@ -1,6 +1,6 @@ ## [Point-Free](https://www.pointfree.co) -> #### This directory contains code from Point-Free Episode: [The Many Faces of Flat-Map: Part 1](https://www.pointfree.co/episodes/ep42-the-many-faces-of-flat-map) +> #### This directory contains code from Point-Free Episode: [The Many Faces of Flat-Map: Part 1](https://www.pointfree.co/episodes/ep42-the-many-faces-of-flat-map-part-1) > > Previously we've discussed the `map` and `zip` operations in detail, and today we start completing the trilogy by exploring `flatMap`. This operation is precisely the tool needed to solve a nesting problem that `map` and `zip` alone cannot. diff --git a/0043-many-faces-of-flatmap-pt2/README.md b/0043-many-faces-of-flatmap-pt2/README.md deleted file mode 100644 index a453297d..00000000 --- a/0043-many-faces-of-flatmap-pt2/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# 0041-many-faces-of-flatmap-pt1 - -A description of this package. diff --git a/0043-many-faces-of-flatmap-pt2/.gitignore b/0043-the-many-faces-of-flatmap-pt2/.gitignore similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/.gitignore rename to 0043-the-many-faces-of-flatmap-pt2/.gitignore diff --git a/0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/contents.xcworkspacedata b/0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/contents.xcworkspacedata similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/contents.xcworkspacedata rename to 0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/contents.xcworkspacedata diff --git a/0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to 0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to 0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt1.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/Contents.swift b/0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/Contents.swift similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/Contents.swift rename to 0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/Contents.swift diff --git a/0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/Sources/Util.swift b/0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/Sources/Util.swift similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/Sources/Util.swift rename to 0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/Sources/Util.swift diff --git a/0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/contents.xcplayground b/0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/contents.xcplayground similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/contents.xcplayground rename to 0043-the-many-faces-of-flatmap-pt2/ManyFacesOfFlatMapPt2.playground/contents.xcplayground diff --git a/0043-many-faces-of-flatmap-pt2/Package.resolved b/0043-the-many-faces-of-flatmap-pt2/Package.resolved similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/Package.resolved rename to 0043-the-many-faces-of-flatmap-pt2/Package.resolved diff --git a/0043-many-faces-of-flatmap-pt2/Package.swift b/0043-the-many-faces-of-flatmap-pt2/Package.swift similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/Package.swift rename to 0043-the-many-faces-of-flatmap-pt2/Package.swift diff --git a/0043-the-many-faces-of-flatmap-pt2/README.md b/0043-the-many-faces-of-flatmap-pt2/README.md new file mode 100644 index 00000000..0abebd97 --- /dev/null +++ b/0043-the-many-faces-of-flatmap-pt2/README.md @@ -0,0 +1,14 @@ +## [Point-Free](https://www.pointfree.co) + +> #### This directory contains code from Point-Free Episode: [The Many Faces of Flat-Map: Part 2](https://www.pointfree.co/episodes/ep43-the-many-faces-of-flat-map-part-2) +> +> Now that we know that `flatMap` is important for flattening nested arrays and optionals, we should feel empowered to define it on our own types. This leads us to understanding its structure more in depth and how it’s different from `map` and `zip`. + +### Getting Started + +* Clone repo +* `cd` into this directory +* Run `swift package generate-xcodeproj` +* Open `ManyFacesOfFlatMapPt2.xcworkspace` +* Build the package for _macOS_ +* Open the playground diff --git a/0043-many-faces-of-flatmap-pt2/Sources/ManyFacesOfFlatMapPt2/ManyFacesOfFlatMapPt2.swift b/0043-the-many-faces-of-flatmap-pt2/Sources/ManyFacesOfFlatMapPt2/ManyFacesOfFlatMapPt2.swift similarity index 100% rename from 0043-many-faces-of-flatmap-pt2/Sources/ManyFacesOfFlatMapPt2/ManyFacesOfFlatMapPt2.swift rename to 0043-the-many-faces-of-flatmap-pt2/Sources/ManyFacesOfFlatMapPt2/ManyFacesOfFlatMapPt2.swift