mirror of
https://github.com/github/semantic.git
synced 2024-11-25 21:43:07 +03:00
Document Cofree.extend()
.
This commit is contained in:
parent
011719b752
commit
b50ebdf21a
@ -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) })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user