mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Add a public constructor.
This commit is contained in:
parent
78ae28a1ae
commit
d82acf8b9f
@ -1,4 +1,9 @@
|
|||||||
public struct Prism<From, To> {
|
public struct Prism<From, To> {
|
||||||
|
public init(forward: From -> To?, backward: To -> From) {
|
||||||
|
self.forward = forward
|
||||||
|
self.backward = backward
|
||||||
|
}
|
||||||
|
|
||||||
public let forward: From -> To?
|
public let forward: From -> To?
|
||||||
public let backward: To -> From
|
public let backward: To -> From
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user