joeldentici / monadic-js Goto Github PK
View Code? Open in Web Editor NEWAlgebraic structure implementations, do-notation, and operators to truly live the fantasy
License: MIT License
Algebraic structure implementations, do-notation, and operators to truly live the fantasy
License: MIT License
Right now left recursion curtailment is using parity of the parser to determine whether we should curtail at 1 + remaining length or remaining length. This is necessary for the result to be properly passed back up the recursive call stack when we finally find a parser that doesn't lead to curtailment.
An improvement on what is currently being done is to ignore parity all together and just accept the longest result (by comparing it to the stored result and storing whichever is longer). We can determine the longest result simply by whichever has the furthest position, which removes having to do any error-prone checks on the actual result (which literally should never be done on polymorphic code). This will work regardless of the parity of the parser.
Doing this will make it actually feasible to memoize a lot more of the parsers in the do-notation parse module (since right now it would require calculating the parity of all the parsers). This could lead to much faster parsing of do-notation. In fact, doing this will make it possible to just bring back default memoization if that is desired.
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.