Skip to content

Instantly share code, notes, and snippets.

@lorenzoongithub
Created July 2, 2015 19:44
Show Gist options
  • Save lorenzoongithub/6fa48aa169c18ed9488f to your computer and use it in GitHub Desktop.
Save lorenzoongithub/6fa48aa169c18ed9488f to your computer and use it in GitHub Desktop.
ramda.js
//
// http://Ramdajs.org - a functional library
//
load('https://cdnjs.cloudflare.com/ajax/libs/ramda/0.14.0/ramda.js');
incr = R.add(1);
x = incr(10);
if (x !== 11) throw '';
x = R.all(function(x) { return x%2==0; },[1,2,3,4]);
if (x !== false) throw '';
x = R.any(function(x) { return x%2==0; },[1,2,3,4]);
if (x !== true) throw '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment