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