Trait naan::HKT2

source ·
pub trait HKT2 {
    type T<A, B>;
}
Expand description

A marker that points to a type with 2 generic parameters.

use naan::prelude::*;

enum Either<A, B> {
  Left(A),
  Right(B),
}

struct EitherHKT;

impl HKT2 for EitherHKT {
  type T<A, B> = Either<A, B>;
}

Required Associated Types§

source

type T<A, B>

The generic type

Implementors§

source§

impl HKT2 for BTreeMap

§

type T<K, V> = BTreeMap<K, V, Global>

source§

impl HKT2 for HashMap

§

type T<K, A> = HashMap<K, A, RandomState>

source§

impl HKT2 for Result

§

type T<A, B> = Result<A, B>