1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 21:43:07 +03:00

Document Cofree.document().

This commit is contained in:
Rob Rix 2015-10-14 10:23:43 -04:00
parent b50ebdf21a
commit 5015238546

View File

@ -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 })
} }