Refactor Lambda too
This commit is contained in:
parent
c7dfd01a5e
commit
888e64d485
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue