mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
duplicate()
is just extend(id)
.
This commit is contained in:
parent
5015238546
commit
fa2bfcd367
@ -44,6 +44,9 @@ extension Cofree {
|
||||
|
||||
/// Returns a new `Cofree` constructed by recursively annotating each subtree with itself.
|
||||
public var duplicate: Cofree<A, Cofree<A, B>> {
|
||||
return .Unroll(self, unwrap.map { $0.duplicate })
|
||||
return extend(id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
import Prelude
|
||||
|
Loading…
Reference in New Issue
Block a user