mirror of
https://github.com/github/semantic.git
synced 2024-11-29 11:02:26 +03:00
Document Cofree.document()
.
This commit is contained in:
parent
b50ebdf21a
commit
5015238546
@ -42,6 +42,7 @@ extension Cofree {
|
|||||||
return .Unroll(transform(self), unwrap.map { $0.extend(transform) })
|
return .Unroll(transform(self), unwrap.map { $0.extend(transform) })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a new `Cofree` constructed by recursively annotating each subtree with itself.
|
||||||
public var duplicate: Cofree<A, Cofree<A, B>> {
|
public var duplicate: Cofree<A, Cofree<A, B>> {
|
||||||
return .Unroll(self, unwrap.map { $0.duplicate })
|
return .Unroll(self, unwrap.map { $0.duplicate })
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user