1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
use super::*;
use std::marker::PhantomData;

pub struct Empty<T>(PhantomData<T>);

impl<T> ListFn for Empty<T> {
    type Item = T;
    type End = Self;
    fn list(self) -> List<Self> {
        List::End(self)
    }
}

impl<T> Default for Empty<T> {
    fn default() -> Self {
        Empty(PhantomData::default())
    }
}