Struct naan::fun::curry3::Curry3

source ·
pub struct Curry3<F, A, B, C, D> { /* private fields */ }
Expand description

A curried function that accepts 2 arguments

Implementations§

source§

impl<F, A, B, C, D> Curry3<F, Nothing<A>, Nothing<B>, Nothing<C>, D>where F: F3Once<A, B, C, Ret = D>,

source

pub fn curry(f: F) -> Self

Curry a ternary function

source

pub fn uncurry(self) -> F

Unwrap the Curry2 wrapper, getting the inner function

Trait Implementations§

source§

impl<F, A, B, C, D> Clone for Curry3<F, A, B, C, D>where F: Clone + FnOnce(A::T, B::T) -> C::T, A: Arg + Clone, B: Arg + Clone, C: Arg,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<K, A, B> Traversable<BTreeMapValues<K>, A, B, Curry3<fn(_: K, _: B, _: BTreeMap<K, B, Global>) -> BTreeMap<K, B, Global>, Just<K>, Just<B>, Nothing<BTreeMap<K, B, Global>>, BTreeMap<K, B, Global>>> for BTreeMap<K, A>where K: Clone + Ord, BTreeMapValues<K>: HKT1<T<B> = BTreeMap<K, B>>,

source§

fn traversem1<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<BTreeMap<K, B>>where Ap: HKT1, Self: Foldable<BTreeMapValues<K>, A>, Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>, Ap::T<insert2<K, B>>: Applicative<Ap, insert2<K, B>> + ApplyOnce<Ap, insert2<K, B>>, Ap::T<BTreeMap<K, B>>: Applicative<Ap, BTreeMap<K, B>> + ApplyOnce<Ap, BTreeMap<K, B>>, AtoApOfB: F1<A, Ret = Ap::T<B>>, BTreeMapValues<K>: HKT1<T<A> = Self>,

Traverse a structure with 0 or more elements, collecting into an Applicative of 0 or 1 elements. Read more
source§

fn traversemm<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<BTreeMap<K, B>>where Ap: HKT1, Self: Foldable<BTreeMapValues<K>, A>, B: Clone, Ap::T<B>: Applicative<Ap, B>, Ap::T<insert2<K, B>>: Applicative<Ap, insert2<K, B>>, Ap::T<BTreeMap<K, B>>: Applicative<Ap, BTreeMap<K, B>>, AtoApOfB: F1<A, Ret = Ap::T<B>>, BTreeMapValues<K>: HKT1<T<A> = Self>,

Traverse a structure with 0 or more elements, collecting into an Applicative of 0 or more elements.
source§

impl<K, A, B> Traversable<HashMapValues<K>, A, B, Curry3<fn(_: K, _: B, _: HashMap<K, B, RandomState>) -> HashMap<K, B, RandomState>, Just<K>, Just<B>, Nothing<HashMap<K, B, RandomState>>, HashMap<K, B, RandomState>>> for HashMap<K, A>where K: Clone + Eq + Hash, HashMapValues<K>: HKT1<T<B> = HashMap<K, B>>,

source§

fn traversem1<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<HashMap<K, B>>where Ap: HKT1, Self: Foldable<HashMapValues<K>, A>, Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>, Ap::T<insert2<K, B>>: Applicative<Ap, insert2<K, B>> + ApplyOnce<Ap, insert2<K, B>>, Ap::T<HashMap<K, B>>: Applicative<Ap, HashMap<K, B>> + ApplyOnce<Ap, HashMap<K, B>>, AtoApOfB: F1<A, Ret = Ap::T<B>>, HashMapValues<K>: HKT1<T<A> = Self>,

Traverse a structure with 0 or more elements, collecting into an Applicative of 0 or 1 elements. Read more
source§

fn traversemm<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<HashMap<K, B>>where Ap: HKT1, Self: Foldable<HashMapValues<K>, A>, B: Clone, Ap::T<B>: Applicative<Ap, B>, Ap::T<insert2<K, B>>: Applicative<Ap, insert2<K, B>>, Ap::T<HashMap<K, B>>: Applicative<Ap, HashMap<K, B>>, AtoApOfB: F1<A, Ret = Ap::T<B>>, HashMapValues<K>: HKT1<T<A> = Self>,

Traverse a structure with 0 or more elements, collecting into an Applicative of 0 or more elements.

Auto Trait Implementations§

§

impl<F, A, B, C, D> RefUnwindSafe for Curry3<F, A, B, C, D>where A: RefUnwindSafe, B: RefUnwindSafe, C: RefUnwindSafe, D: RefUnwindSafe, F: RefUnwindSafe,

§

impl<F, A, B, C, D> Send for Curry3<F, A, B, C, D>where A: Send, B: Send, C: Send, D: Send, F: Send,

§

impl<F, A, B, C, D> Sync for Curry3<F, A, B, C, D>where A: Sync, B: Sync, C: Sync, D: Sync, F: Sync,

§

impl<F, A, B, C, D> Unpin for Curry3<F, A, B, C, D>where A: Unpin, B: Unpin, C: Unpin, D: Unpin, F: Unpin,

§

impl<F, A, B, C, D> UnwindSafe for Curry3<F, A, B, C, D>where A: UnwindSafe, B: UnwindSafe, C: UnwindSafe, D: UnwindSafe, F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<F, A, TF, T> Sequence<F, A, TF> for T

source§

fn sequence<Ap>(self) -> Ap::T<F::T<A>>where Self: Sized + Traversable<F, Ap::T<A>, A, TF> + Foldable<F, Ap::T<A>>, Ap: HKT1, Ap::T<A>: Applicative<Ap, A> + ApplyOnce<Ap, A>, Ap::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>, Ap::T<F::T<A>>: Applicative<Ap, F::T<A>> + ApplyOnce<Ap, F::T<A>>, F: HKT1<T<Ap::T<A>> = Self>,

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.