diff --git a/prototype/Doubt/TermType.swift b/prototype/Doubt/TermType.swift index a686c311a..b87498937 100644 --- a/prototype/Doubt/TermType.swift +++ b/prototype/Doubt/TermType.swift @@ -14,6 +14,10 @@ extension TermType { return self |> ({ $0.unwrap } >>> { $0.map { $0.cata(transform) } } >>> transform) } + public func para(transform: (Syntax<(Self, Result), LeafType>) -> Result) -> Result { + return self |> ({ $0.unwrap } >>> { $0.map { ($0, $0.para(transform)) } } >>> transform) + } + /// The count of nodes in the receiver. ///