Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Add Pointed and Copointed functor? #15

Closed
gcanti opened this issue Aug 30, 2016 · 2 comments
Closed

Add Pointed and Copointed functor? #15

gcanti opened this issue Aug 30, 2016 · 2 comments

Comments

@gcanti
Copy link
Owner

gcanti commented Aug 30, 2016

export interface Pointed<F> extends Functor<F> {
  of<A>(a: A): HKT<F, A>
}
export interface Copointed<F> extends Functor<F> {
  extract<A>(ca: HKT<F, A>): A
}

And then

export interface Applicative<F> extends Apply<F>, Pointed<F> {}
export interface Comonad<F> extends Functor<F>, Extend<F>, Copointed<F> {}
@rjmk
Copy link

rjmk commented Oct 5, 2016

I think you can just have

export interface Comonad<F> extends Extend<F>, Copointed<F> {}

without the Functor<F>

@gcanti
Copy link
Owner Author

gcanti commented Oct 5, 2016

Ah sure, good catch, thanks

gcanti added a commit that referenced this issue Oct 6, 2016
@gcanti gcanti closed this as completed in 80aefe0 Oct 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants