Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

uniform getter #1

Open
DrBoolean opened this issue Feb 5, 2016 · 1 comment
Open

uniform getter #1

DrBoolean opened this issue Feb 5, 2016 · 1 comment

Comments

@DrBoolean
Copy link

Something that always irked me about haskell is the getSum/getProduct etc functions. It makes writing functions less generic than just passing in the favored monoid.

const any = xs => xs.foldMap(Any).getAny
const all = xs => xs.foldMap(All).getAll

I had luck with working with a common getter like getVal Thoughts?

@SimonRichardson
Copy link
Member

I don't mind get, but getVal works!

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