ifm-lw-r1-js
Advanced tools
Comparing version 4.0.0 to 4.0.1
'use strict'; | ||
function input1(x) { | ||
return function (y) { | ||
return x(y); | ||
}; | ||
} | ||
const input1 = x => y => x(y); | ||
function input2(x) { | ||
return function (y) { | ||
return x(x(y)); | ||
}; | ||
} | ||
const input2 = x => y => x(x(y)); | ||
function input3(x) { | ||
return function (y) { | ||
return x(x(x(x(x(x(x(x(x(x(y)))))))))); | ||
}; | ||
} | ||
const input3 = x => y => x(x(x(x(x(x(x(x(x(x(y)))))))))); | ||
function input4(x) { | ||
return input3(input3(x)); | ||
} | ||
const input4 = x => input3(input3(x)); | ||
function input5(x) { | ||
return input3(input4(x)); | ||
} | ||
const input5 = x => input3(input4(x)); | ||
function inc(x) { | ||
return x + 1; | ||
} | ||
const count = f => f(x => x + 1)(0); | ||
function count(f) { | ||
return f(inc)(0); | ||
} | ||
module.exports = { input1, input2, input3, input4, input5, count }; |
{ | ||
"name": "ifm-lw-r1-js", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "inFullMobile Language Wars: Round 1 - JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "f.js", |
@@ -36,4 +36,7 @@ inFullMobile Language Wars: Round 1 - JavaScript | ||
------------ | ||
Sample input to test the solution: [helpers.js](helpers.js) (old syntax for easier translation to other languages) | ||
Sample input to test the solution: [helpers.js](helpers.js) | ||
(See helpers from [the old JavaScript solution](https://github.com/rsp/ifm-lw-r1-ojs) | ||
for easier translation to other languages.) | ||
Tests | ||
@@ -40,0 +43,0 @@ ----- |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95
9472
54