diff --git a/prototype/Doubt/Cofree.swift b/prototype/Doubt/Cofree.swift index 8e9b89325..afe4558dc 100644 --- a/prototype/Doubt/Cofree.swift +++ b/prototype/Doubt/Cofree.swift @@ -21,4 +21,8 @@ extension Cofree { return b } } + + func extend(transform: Cofree -> Other) -> Cofree { + return .Unroll(transform(self), unwrap.map { $0.extend(transform) }) + } }