mirror of
https://github.com/github/semantic.git
synced 2024-11-24 17:04:47 +03:00
Free.merge
’s argument does not escape.
This commit is contained in:
parent
d7eb23d291
commit
8ca7cf7599
@ -131,11 +131,11 @@ extension Free {
|
||||
extension Free where Value: PatchType, Value.Element == Cofree<Leaf, ()> {
|
||||
public typealias Term = Value.Element
|
||||
|
||||
public func merge(transform: Value -> Term) -> Term {
|
||||
public func merge(@noescape transform: Value -> Term) -> Term {
|
||||
return map(transform).cata { Cofree((), $0) }
|
||||
}
|
||||
|
||||
public func merge(transform: Value -> Term?) -> Term? {
|
||||
public func merge(@noescape transform: Value -> Term?) -> Term? {
|
||||
return map(transform).cata(Free.discardNullTerms)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user