hemanth / hemanth/functional-programming-jargon
Is array concatenation a monoid?
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.7k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
I'm not so sure about the monoid section, where it's stated that:
Array concatenation also forms a monoid
With the example:
[1, 2].concat([3, 4])
I don't feel like array concatenation satisfies "associativity" at all, since a.concat(b) clearly differs from b.concat(a). Can someone explain this for me?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the monoid section and its array-concatenation example. Clarify the distinction between associativity and commutativity, and consider whether the section needs revised wording; the explanation should resolve the reported confusion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100