An updated HKT encoding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait StarToStar<Input> { | |
type Output; | |
} | |
type Apply<Name, Elt> where Name: StarToStar<Elt> = Name::Output; | |
struct Vec_; | |
struct DList_; | |
impl<T> StarToStar<T> for Vec_ { | |
type Output = Vec<T>; | |
} | |
impl<T> StarToStar<T> for DList_ { | |
type Output = DList<T>; | |
} | |
trait Mappable | |
{ | |
type E; | |
type HKT where Apply<HKT, E> = Self; | |
fn map<F>(self, f: E -> F) -> Apply<HKT, F>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment