Skip to content

Instantly share code, notes, and snippets.

@SuperManEver
Created October 1, 2016 12:13
Show Gist options
  • Save SuperManEver/255370a60e05fd8e493994c33d7affda to your computer and use it in GitHub Desktop.
Save SuperManEver/255370a60e05fd8e493994c33d7affda to your computer and use it in GitHub Desktop.
var R = require('ramda');
var multiply = R.curry(function(x, y) {
return x * y;
});
var double = multiply(2);
var splitOnI = R.split('i');
splitOnI('mississippi');
var splitter = R.split(' ');
splitter('one two three');
// write function that find maximum
function largest (a, b) {
return a > b ? a : b
}
var numbers = [13, 5, 11, 21, 17, 29, 15];
// var maximum = R.reduce(largest, -Infinity);
var maximum = R.reduce((a, b) => { return a > b ? a : b }, -Infinity);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment