Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Semigroup and Monoid instances for Scraper #16

Open
IMax153 opened this issue Jan 19, 2021 · 0 comments
Open

Add Semigroup and Monoid instances for Scraper #16

IMax153 opened this issue Jan 19, 2021 · 0 comments

Comments

@IMax153
Copy link
Owner

IMax153 commented Jan 19, 2021

import * as O from 'fp-ts/Option'
import * as R from 'fp-ts/Reader'

const getSemigroup = <A>(S: Semigroup<A>): Semigroup<Scraper<A>> =>
  R.getSemigroup(O.getApplySemigroup(S))

const getMonoid = <A>(M: Monoid<A>): Monoid<Scraper<A>> => R.getMonoid(O.getMonoid(M))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant