Comments (4)
I think we should say function instead of method. While methods can be
used, that won't always be true and anything you can do with methods you
can do with functions. Number and add are a monoid but i can't don't expect
it to be implemented as a method, nor for compose
On Fri, Mar 25, 2016, 1:45 AM boris [email protected] wrote:
Not my point.
I think we should either say A monoid is...
- An object with a map method which accepts a function.
- A datastructure plus some method which accepts that datastructure
plus a function.We all know that these two things are essentially the same but we should
stick with one of them in order to be consistent (else a person who is
reading the docs would presume that there is some difference between the
two concepts.Another way that is more verbose but also clearer is to say both things.
Something like..."A monoid is an object with a map method (or a separate function)..."
Cheers everyone.
—
You are receiving this because you commented.Reply to this email directly or view it on GitHub
https://github.com/hemanth/functional-programming-jargon/issues/29#issuecomment-201203892
from functional-programming-jargon.
All references to "method" have been removed from the document so I think we can call this resolved.
from functional-programming-jargon.
Functions are objects so it's not too much worry to me
On Wed, Mar 23, 2016, 8:30 AM boris [email protected] wrote:
The following two definitions are both correct, but they are inconsistent:
A monoid is some data type and a two parameter function ...
An object with a map function that adhere to certains rules. ...
I don't know which of the two is better. The "object with some methods"
style of definition, limits us in some ways, for example we cannot say
"pure functions form a monoid under functional composition". The other one
seems impractical. Maybe we should incorporate both.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/hemanth/functional-programming-jargon/issues/29
from functional-programming-jargon.
Not my point.
I think we should either say A monoid is...
- An object with a map method which accepts a function.
- A datastructure plus some method which accepts that datastructure plus a function.
We all know that these two things are essentially the same but we should stick with one of them in order to be consistent (else a person who is reading the docs would presume that there is some difference between the two concepts.
Another way that is more verbose but also clearer is to say both things. Something like...
"A monoid is an object with a map method (or a separate function)..."
Cheers everyone.
from functional-programming-jargon.
Related Issues (20)
- Add a section on higher-kinded types HOT 2
- Explanation of `lens` HOT 2
- TOC refers to absent anchor tags HOT 2
- Idempotent inaccurate HOT 2
- Volunteering - Polish translation HOT 4
- Closure appears twice in the document HOT 2
- Avoid polluting globals HOT 2
- Add memoization HOT 1
- Add Identity Function
- Category, Functor, Monad, Comonad, etc. should mention algebraic laws HOT 1
- Natural transformations HOT 1
- Functors are maps for categories HOT 3
- Category example is a preorder/partial order HOT 1
- Suggestions from HN HOT 1
- Add Total Functions HOT 1
- Organize for extensibility HOT 3
- Functor example does not make any sense HOT 2
- Explain why HOT 1
- Monad chain does exist now in JS HOT 3
- Is array concatenation a monoid?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from functional-programming-jargon.