fogus / lemonad Goto Github PK
View Code? Open in Web Editor NEWa functional programming library for javascript. an experiment in elegant JS.
Home Page: http://www.functionaljs.org
License: MIT License
a functional programming library for javascript. an experiment in elegant JS.
Home Page: http://www.functionaljs.org
License: MIT License
Can we add the library to Bower registry? I would be glad to help you do that.
Since you've used Underscore so extensively, I'm sure you're aware of its performance sensitive counterpart, Lodash. In case you hadn't tried it with Lemonad yet, I dropped it in locally as a replacement for Underscore in Lemonad's test suite, and the only tests to fail were ones where Underscore's zip
is expected to throw an exception on non-array arguments, where Lodash's zip
simply returns the empty array (_.zip
being called by Lemonad's interleave
).
I've filed this ticket to understand if there's a rationale for not using Lodash, or if there are any future plans that would conflict with using Lodash as an Underscore replacement.
Hi Fogus,
I'd love to see lemonad become available on cdnjs. Would you consider adding it? (https://github.com/cdnjs/cdnjs) I would be perfectly willing to do the legwork myself, but I didn't want to overstep. Kindly advise at your leisure...
Hi!
The generated annotation (http://fogus.github.io/lemonad/lemonad.html) is outdated now. E.g. there is no information about L.fix, L.rcurry and so on
There is no online documentation showing this library off or describing the capabilities it offers.
The tests would be a sufficient starting place, would that the source be visible and not just recite "pass.
When I tried to include Lemonad in a Node.js app I got the following error (it depends on cons in one of the contrib modules). This is the naive commit I made to fix it. I'm pretty sure it's the wrong thing to do, so I'm not making a pull request.
https://github.com/mqsoh/lemonad/commit/0a703e62c4fbf1b2b095dcf62caa805f5d3dadea
/home/mason/myapp/node_modules/lemonad/lib/lemonad.js:334
_.extend.apply(null, _.cons(target, args));
^
TypeError: Object function (obj) {
if (obj instanceof _) return obj;
if (!(this instanceof _)) return new _(obj);
this._wrapped = obj;
} has no method 'cons'
at Function.L.mix (/home/mason/myapp/node_modules/lemonad/lib/lemonad.js:334:30)
at Object.<anonymous> (/home/mason/myapp/node_modules/lemonad/lib/lemonad.js:417:5)
at Object.<anonymous> (/home/mason/myapp/node_modules/lemonad/lib/lemonad.js:502:4)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/mason/myapp/server.js:2:9)
theClonusHorror can't, for various reasons, clone many of the host objects in JS. It's not really a big problem, since you wouldn't expect most of them be values anyway. But when it comes to regexps, at least I expect them to behave as values. That is, it would be nice if this worked:
var hole = new L.Hole(/foo/);
L.snapshot(hole); //=> /foo/
Currently, L.snapshot(hole)
would return /(?:)/
, an "empty" regex, because you can't access the keys on a host object.
I guess the implementation could check if the object is an instance of RegExp
and either clone it or just return it as with for example functions (which aren't values either, but who modifies a function anyway?).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.