This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
47 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
// @flow | ||
import { HKT } from './HKT' | ||
import type { Apply } from './Apply' | ||
import type { Pointed } from './Pointed' | ||
|
||
export interface Applicative<F> extends Apply<F> { | ||
of<A>(a: A): HKT<F, A> | ||
} | ||
export interface Applicative<F> extends Apply<F>, Pointed<F> {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
// @flow | ||
import { HKT } from './HKT' | ||
import type { Functor } from './Functor' | ||
import type { Extend } from './Extend' | ||
import type { Copointed } from './Copointed' | ||
|
||
export interface Comonad<F> extends Functor<F>, Extend<F> { | ||
extract<A>(ca: HKT<F, A>): A | ||
} | ||
export interface Comonad<F> extends Extend<F>, Copointed<F> {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @flow | ||
import { HKT } from './HKT' | ||
import type { Functor } from './Functor' | ||
|
||
export interface Copointed<F> extends Functor<F> { | ||
extract<A>(ca: HKT<F, A>): A | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @flow | ||
import { HKT } from './HKT' | ||
import type { Functor } from './Functor' | ||
|
||
export interface Pointed<F> extends Functor<F> { | ||
of<A>(a: A): HKT<F, A> | ||
} |
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