diff --git a/prototype/Doubt/TermType.swift b/prototype/Doubt/TermType.swift index 45f951371..85febe2ce 100644 --- a/prototype/Doubt/TermType.swift +++ b/prototype/Doubt/TermType.swift @@ -15,14 +15,14 @@ extension TermType { /// /// Folds the tree encoded by the receiver into a single value by recurring top-down through the tree, applying `transform` to leaves, then to branches, and so forth. public func cata(transform: Syntax -> Result) -> Result { - return self |> ({ $0.unwrap } >>> { $0.map { $0.cata(transform) } } >>> transform) + return self |> (Self.unwrap >>> { $0.map { $0.cata(transform) } } >>> transform) } /// Paramorphism over `TermType`s. /// /// Folds the tree encoded by the receiver into a single value by recurring top-down through the tree, applying `transform` to leaves, then to branches, and so forth. Each recursive instance is made available in the `Syntax` alongside the result value at that node. public func para(transform: Syntax<(Self, Result), LeafType> -> Result) -> Result { - return self |> ({ $0.unwrap } >>> { $0.map { ($0, $0.para(transform)) } } >>> transform) + return self |> (Self.unwrap >>> { $0.map { ($0, $0.para(transform)) } } >>> transform) }