close
The Wayback Machine - https://web.archive.org/web/20190831003329/https://github.com/osteele/functional-javascript
Skip to content
BERJAYA
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
This repository has been archived by the owner. It is now read-only.
Functional is a library for functional programming in JavaScript. It defines the standard higher-order functions such as map, reduce (aka foldl), and select (aka filter). It also defines functions such as curry, rcurry, and partial for partial function application; and compose, guard, and until for function-level programming.
JavaScript HTML CSS Ruby
Branch: master
Clone or download
Latest commit 8cb8eda Jan 30, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BERJAYA .gitignore .hgignore -> .gitignore Feb 14, 2008
BERJAYA .hgtags Added tag working for changeset d216a82e7c18 Sep 8, 2007
BERJAYA CHANGES move functional/* -> . Nov 11, 2007
BERJAYA MIT-LICENSE move functional/* -> . Nov 11, 2007
BERJAYA README Fixed 404ing link in README Jan 6, 2013
BERJAYA README.md add README.md Jan 30, 2017
BERJAYA Rakefile update publish task Feb 14, 2008
BERJAYA agenda.txt remove .htaccess; minor tweaks Nov 11, 2007
BERJAYA evaluator-frame.html move functional/* -> . Nov 11, 2007
BERJAYA evaluator.css move functional/* -> . Nov 11, 2007
BERJAYA evaluator.js emulate Prototype, for examples Feb 14, 2008
BERJAYA examples.js emulate Prototype, for examples Feb 14, 2008
BERJAYA functional.js fix comment describing rcurry Mar 13, 2013
BERJAYA functional.txt move functional/* -> . Nov 11, 2007
BERJAYA iframe-test.html move functional/* -> . Nov 11, 2007
BERJAYA index.html add note about dojo Apr 9, 2009
BERJAYA index.js emulate Prototype, for examples Feb 14, 2008
BERJAYA styles.css update to prototype 1.6; factor +styles.css Nov 14, 2007
BERJAYA tests.html Fixes for tests. Apr 8, 2009
BERJAYA tests.js
BERJAYA to-function.js Add "true", "false", "null" and "undefined" to protected identifiers. Oct 25, 2012

README.md

Functional JavaScript (deprecated)

This code, from 2007, is deprecated. I'm keeping it available for historical interest.

Some of the ideas in this code and in its companion collections.js were used in Jeremy Ashkenas's Underscore.js, which in turn inspired Lodash. Use those instead.

CoffeeScript (aso by Jeremy Ashkenas) and ECMAScript 6 also include arrow functions and functional programming functions such as map. If you use these languages, or many other modern languages that compile into ECMAScript, you can do functional prorammming entirely within the language.

Thanks to everyone who has contributed, and to everyone who has thanked me over the years, thank you in turn.

Links

Original README

Functional defines higher-order methods and functions for functional and function-level programming. It also defines "string lambdas", that allow strings such as x+1 and x -> x+1 to be used in some contexts as functions.

It is licensed under the MIT License.

For more details, see http://osteele.com/sources/javascript/functional/.

Credits

  • Oliver Steele – original author
  • Dean Edwards – Array.slice suggestion
  • henrah – Function.lambda memoization
  • Raganwald – Rhino compatibility
  • Jesse Hallett – Spidermonkey shell compatibiilty
  • Florian Schäfer – allow leading and trailing spaces in expressions
  • Angus Croll – bug fix
You can’t perform that action at this time.