Lemonad: A functional programming library for JavaScript

tosh1 pts0 comments

GitHub - fogus/lemonad: a functional programming library for javascript. an experiment in elegant JS. · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

fogus

lemonad

Public

Notifications<br>You must be signed in to change notification settings

Fork<br>29

Star<br>656

master

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>581 Commits<br>581 Commits

docs

docs

examples

examples

lib

lib

test

test

.gitignore

.gitignore

LICENSE

LICENSE

README.md

README.md

package-lock.json

package-lock.json

package.json

package.json

View all files

Repository files navigation

lemonad

A functional programming library for JavaScript inspired by Clojure, Haskell, SML and Forth.

Using

Add the following to your 'package.json' file in the "dependencies" section:

"lemonad": "0.7.4"

Currently available functions

[ '$',<br>'CAS',<br>'CASMixin',<br>'L',<br>'Hole',<br>'RefMixin',<br>'VERSION',<br>'WatchableMixin',<br>'actions',<br>'addWatch',<br>'checker',<br>'compareAndSwap',<br>'ctor',<br>'curry',<br>'curry2',<br>'curry3',<br>'curry4',<br>'dec',<br>'dispatcher',<br>'eq',<br>'filter',<br>'gt',<br>'gte',<br>'invokeAll',<br>'is',<br>'isArguments',<br>'isArray',<br>'isObject',<br>'isReference',<br>'isString',<br>'lift',<br>'lt',<br>'lte',<br>'map',<br>'meth',<br>'invoker',<br>'walterWhite',<br>'mix',<br>'nth',<br>'partial1',<br>'partial2',<br>'pipeline',<br>'rcurry',<br>'rcurry2',<br>'rcurry3',<br>'rcurry4',<br>'reduce',<br>'removeWatch',<br>'rot',<br>'setValue',<br>'swap',<br>'typed' ]

Development 💡

To set up the project for development and install dev tools run:

npm install

This installs production dependencies and devDependencies (including Jest).

Running tests ✅

Run the entire test suite:

npm test

Run a single spec file:

.spec.js">npx jest test/specs/name>.spec.js

Run Jest in watch mode while editing:

npx jest --watch

Notes:

Tests are powered by Jest . Spec files live under test/specs/*.spec.js.

test/jest.setup.js exposes the library global L so existing specs continue to work.

Generating annotations

npx docco -o docs/site lib/lemonad.js

Influences / References

Clojure and ClojureScript

Inheritance Patterns in JavaScript by Michael Bolin

Underscore.js

Functional JavaScript by Oliver Steele

Functional JavaScript (the book)

Todo

The rest of the things

Promises/A-compatible functions (http://wiki.commonjs.org/wiki/Promises/A)

Moar monadology

Logic vars?

Unification?

Other things that I can't think of right now

Generators / iterators?

Futures?

Laziness?

Badass memoize

Some data generators?

merges

walking

rel alg

into for objects

make sure that anything that works for array also works for arguments

Make sure I say, sequence on input and array on output

yggdrasil

undermine

reb

cljs

tables

bach.js

datalog

poems

shape decls

cheatsheet

site

License

This software is provided as-is under the MIT license.

About

a functional programming library for javascript. an experiment in elegant JS.

www.functionaljs.org

Resources

Readme

License

MIT license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

656<br>stars

Watchers

40<br>watching

Forks

29<br>forks

Report repository

Releases

tags

Packages

Uh oh!

There was an error while loading. Please reload this page.

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

JavaScript<br>100.0%

You can’t perform that action at this time.

javascript reload test lemonad functional license

Related Articles