blob: 76ae96757c529a6661e9b8d1cc6327620f6c53c0 [file] [log] [blame]
pub trait Invoke<A> {
type Result;
fn invoke(self, arg: A) -> Self::Result;
}
#[derive(Copy, Clone)]
pub struct Identity;
impl<A> Invoke<A> for Identity {
type Result = A;
fn invoke(self, arg: A) -> A {
arg
}
}