Refactor Lambda too

This commit is contained in:
Turner 2022-06-27 14:07:08 -07:00 committed by Lucas
parent c7dfd01a5e
commit 888e64d485
1 changed files with 12 additions and 0 deletions

View File

@ -14,6 +14,10 @@ pub struct Empty {
version: (usize, usize, usize), version: (usize, usize, usize),
} }
pub struct LambdaBuilder<T> {
outer: T,
}
pub trait WithTerm pub trait WithTerm
where where
Self: Sized, Self: Sized,
@ -49,6 +53,14 @@ impl WithTerm for Empty {
} }
} }
impl<T: WithTerm> WithTerm for LambdaBuilder<T> {
type Next = T::Next;
fn next(self, term: Term<Name>) -> Self::Next {
self.outer.next(term)
}
}
impl Builder { impl Builder {
pub fn new(maj: usize, min: usize, patch: usize) -> Empty { pub fn new(maj: usize, min: usize, patch: usize) -> Empty {
Empty { Empty {