1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Define iterate so as to clarify its relationship with cata.

This commit is contained in:
Rob Rix 2015-10-22 17:15:49 -04:00
parent 521e253240
commit d0aeedeb52

View File

@ -57,7 +57,7 @@ public enum Free<Leaf, Annotation, Value>: CustomDebugStringConvertible {
public func iterate(transform: Syntax<Value, Leaf> -> Value) -> Value {
return analysis(
ifPure: id,
ifRoll: { transform($0.map { $0.iterate(transform) }) })
ifRoll: { $0.map { $0.iterate(transform) } } >>> transform)
}