Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
byteshiva authored Mar 26, 2019
1 parent 73c51bd commit 6f789f1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions functionalprogramming/day186/funcday186/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const R = require('ramda');

const rreduceRight1 = R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2

console.log(rreduceRight1);
// - -2
// / \ / \
// 1 - 1 3
// / \ / \
// 2 - ==> 2 -1
// / \ / \
// 3 - 3 4
// / \ / \
// 4 0 4 0

12 changes: 12 additions & 0 deletions functionalprogramming/day186/funcday186/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "funcday186",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}

0 comments on commit 6f789f1

Please sign in to comment.