1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

We really don’t need this old thing.

This commit is contained in:
Rob Rix 2015-09-21 16:45:52 -04:00
parent 83e3c8e232
commit 13f1d70071

View File

@ -8,12 +8,6 @@ public struct Prism<From, To> {
public let backward: To -> From
}
extension Dictionary {
static func prism(key: Key) -> Prism<[Key:Value], Value> {
return Prism(forward: { $0[key] }, backward: { [key: $0] })
}
}
public func >>> <From, Part, To> (left: Prism<From, Part>, right: Prism<Part, To>) -> Prism<From, To> {
return Prism(forward: { left.forward($0).flatMap(right.forward) }, backward: right.backward >>> left.backward)
}