Comments (5)
Yeah. It's an error
On Tue, Jul 26, 2016, 1:17 AM G. Kay Lee [email protected] wrote:
Array.prototype.of = (v) => [v];
[].of(1) // [1]
However, there is only Array.of
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/of,
not Array.prototype.of. Is this an error, or is an Array.prototype.of
implementation details missing here?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#77, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAB-4BuF9131udklj_STNZ7cehXI8C2Cks5qZcKBgaJpZM4JU5Q4
.
from functional-programming-jargon.
Okay, sorry, my bad - the implementation details of Array.prototype.of
is clearly provided. Not sure what I was saying.
Since an Array instance is a functor due to the presence of Array.prototype.map
, an Array instance can not possibly be a pointed functor if the of
method is not implemented by the users as Array.prototype.of
, correct? If that's the case, then I'd suggest making it clear on the docs that this is not an error and should not be confused with Array.of
.
from functional-programming-jargon.
Debatable. I think these laws hold as long as a function exists which
satisfies the rules regardless of whether it's a method or not
On Tue, Jul 26, 2016, 2:25 AM G. Kay Lee [email protected] wrote:
Okay, sorry, my bad - the implementation details of Array.prototype.of is
clearly provided. Not sure what I was saying.Since an Array instance is a functor due to the presence of
Array.prototype.map, an Array instance can not possibly be a pointed
functor if the of method is not implemented by the users as
Array.prototype.of, correct? If that's the case, then I'd suggest making
it clear on the docs that this is not an error and should not be confused
with Array.of.—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#77 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB-4JcXw1eMN0fhivYTmdTeydqogoHtks5qZdJxgaJpZM4JU5Q4
.
from functional-programming-jargon.
fantasyland is bit more strict about the implementation than the definition
needs to be
On Tue, Jul 26, 2016, 11:24 AM Jethro Larson [email protected] wrote:
Debatable. I think these laws hold as long as a function exists which
satisfies the rules regardless of whether it's a method or notOn Tue, Jul 26, 2016, 2:25 AM G. Kay Lee [email protected] wrote:
Okay, sorry, my bad - the implementation details of Array.prototype.of
is clearly provided. Not sure what I was saying.Since an Array instance is a functor due to the presence of
Array.prototype.map, an Array instance can not possibly be a pointed
functor if the of method is not implemented by the users as
Array.prototype.of, correct? If that's the case, then I'd suggest making
it clear on the docs that this is not an error and should not be confused
with Array.of.—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#77 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB-4JcXw1eMN0fhivYTmdTeydqogoHtks5qZdJxgaJpZM4JU5Q4
.
from functional-programming-jargon.
Close?
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.