mirror of
https://github.com/github/semantic.git
synced 2024-11-29 11:02:26 +03:00
FreeAlgorithm
doesn’t need recur
when B: FreeConvertible
.
This commit is contained in:
parent
1fcba3fca0
commit
36c8fa03c9
@ -201,4 +201,8 @@ extension FreeAlgorithm where B: FreeConvertible, B.RollType == A, B.PureType ==
|
||||
self = .Roll(.Recursive(a, b, B.init >>> FreeAlgorithm.Pure))
|
||||
}
|
||||
}
|
||||
|
||||
public func evaluate(equals: (A, A) -> Bool) -> B {
|
||||
return evaluate(equals, recur: { FreeAlgorithm($0, $1).evaluate(equals).free })
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user