1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Prism & its concatenation are public.

This commit is contained in:
Rob Rix 2015-09-21 15:22:14 -04:00
parent 21e1b7e3e9
commit e989c8aac5

View File

@ -1,4 +1,4 @@
struct Prism<From, To> {
public struct Prism<From, To> {
let forward: From -> To?
let backward: To -> From
}
@ -9,6 +9,6 @@ extension Dictionary {
}
}
func >>> <From, Part, To> (left: Prism<From, Part>, right: Prism<Part, To>) -> Prism<From, To> {
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)
}