diff --git a/crates/program_builder/src/lib.rs b/crates/program_builder/src/lib.rs index 30ff50cb..4a0dc9c9 100644 --- a/crates/program_builder/src/lib.rs +++ b/crates/program_builder/src/lib.rs @@ -14,6 +14,10 @@ pub struct Empty { version: (usize, usize, usize), } +pub struct LambdaBuilder { + outer: T, +} + pub trait WithTerm where Self: Sized, @@ -49,6 +53,14 @@ impl WithTerm for Empty { } } +impl WithTerm for LambdaBuilder { + type Next = T::Next; + + fn next(self, term: Term) -> Self::Next { + self.outer.next(term) + } +} + impl Builder { pub fn new(maj: usize, min: usize, patch: usize) -> Empty { Empty {