hemanth / hemanth/functional-programming-jargon
Various wording problems
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.7k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
A number of problems with confusing or dubious words in some of the explanations:
(About currying)
into the same function with an arity of one
This is, very obviously, wrongly worded. It cannot be, in the general case, the same function with an arity of one. Saying that does not really explain at all what it means.
(About composition)
A function which
Composition is an operation, a process... not necessarily a function.
(About purity)
The example shows lack of side effects (which are explained in a later section) but it doesn't show the constrain of depending only on input values.
(About idempotence)
if it has no side-effects on multiple executions
Again, wrongly worded, or at least confusingly worded. It means multiple executions do not change the result further. Exactly what the f( f( f(x) ) ) === f(x) says. Mentioning side-effects in here does not help in any way; it just confuses things.
(About point-free style)
the definition does not explicitly define arguments
To be more precise and avoid repetition of definition-define, it would be better to say it doesn't identify, mention or name the arguments, not that it doesn't define them.
(About Categories)
Objects with associated functions
The use of "Objects" there is potentially very misleading. The same happens later when Functor is defined as "An object with a map function". Generally, a much more clear word there would be types instead of objects. The explanation of Functor seems to go back and forth between insinuating that a particular array is a Functor and saying that Array itself is the Functor. Later still, in Monoid, the reference to types is finally made. But then again Monad, Setoid, Foldable... go back to using "object" instead of "type".
(About lift)
Lift is like map except it can be applied to multiple functors.
This seems to be (sort of) a particular definition of lift, but I wonder just how general this is and I feel it raises confusion with the more general transformation of lifting. Maybe a reference to the Fantasy Land Spec should be made right at the start of the document?
(About Monad)
of is mentioned but neither explained nor shown in examples.
(About Isomorphism)
The definition is anything but clear... "structural in nature and no data is lost" doesn't really help.
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 explanations for currying, composition, purity, idempotence, point-free style, categories, lift, Monad, and isomorphism. Start by locating these entries in the project’s documentation, then check their surrounding terminology and examples. Done means the wording is precise, consistent, and the missing Monad of explanation and examples are addressed.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100