use core::marker::Tuple;
use crate::Curried;
pub trait RCurriable<C, X: Tuple> = RCurry<C, Output: FnOnce<X>>;
pub const trait RCurry<C>: Sized
{
type Output;
fn rcurry_once(self, arg: C) -> Self::Output;
fn rcurry_mut(&mut self, arg: C) -> <&mut Self as RCurry<C>>::Output
{
self.rcurry_once(arg)
}
fn rcurry(&self, arg: C) -> <&Self as RCurry<C>>::Output
{
self.rcurry_once(arg)
}
}
impl<C, F> const RCurry<C> for F
{
type Output = Curried<(), (C,), F>;
fn rcurry_once(self, arg: C) -> Self::Output
{
Curried::rcurry(self, arg)
}
}