Created
October 1, 2016 12:13
-
-
Save SuperManEver/255370a60e05fd8e493994c33d7affda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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