mirror of
https://github.com/github/semantic.git
synced 2024-11-25 21:43:07 +03:00
Implement extend
on Cofree.
This commit is contained in:
parent
ab554c52a0
commit
26f0ea419d
@ -21,4 +21,8 @@ extension Cofree {
|
|||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func extend<Other>(transform: Cofree -> Other) -> Cofree<A, Other> {
|
||||||
|
return .Unroll(transform(self), unwrap.map { $0.extend(transform) })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user