1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 11:02:26 +03:00

Document Cofree.extend().

This commit is contained in:
Rob Rix 2015-10-14 10:22:04 -04:00
parent 011719b752
commit b50ebdf21a

View File

@ -37,6 +37,7 @@ extension Cofree {
}
}
/// Returns a new `Cofree` by recursively applying `transform` to each node, producing the annotations for the copy.
public func extend<Other>(@noescape transform: Cofree -> Other) -> Cofree<A, Other> {
return .Unroll(transform(self), unwrap.map { $0.extend(transform) })
}