mirror of
https://github.com/github/semantic.git
synced 2024-11-25 21:43:07 +03:00
Add a Syntax to Cofree.
This commit is contained in:
parent
0d662ade08
commit
59dd626361
@ -1,7 +1,7 @@
|
|||||||
// Copyright © 2015 GitHub. All rights reserved.
|
// Copyright © 2015 GitHub. All rights reserved.
|
||||||
|
|
||||||
public enum Cofree<B> {
|
public enum Cofree<A, B> {
|
||||||
case Unroll(B)
|
case Unroll(B, Syntax<Cofree, A>)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ public enum Cofree<B> {
|
|||||||
extension Cofree {
|
extension Cofree {
|
||||||
var extract: B {
|
var extract: B {
|
||||||
switch self {
|
switch self {
|
||||||
case let .Unroll(b):
|
case let .Unroll(b, _):
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user