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),
}
pub struct LambdaBuilder<T> {
outer: T,
}
pub trait WithTerm
where
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 {
pub fn new(maj: usize, min: usize, patch: usize) -> Empty {
Empty {