compose-function
Advanced tools
Comparing version 1.1.1 to 1.3.0
{ | ||
"name": "compose-function", | ||
"version": "1.1.1", | ||
"version": "1.3.0", | ||
"description": "Compose new functions f(g(x))", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha" | ||
"test": "sjs -m ./macro test.sjs -o test.js; _mocha --reporter nyan; rm test.js" | ||
}, | ||
@@ -27,5 +27,7 @@ "repository": { | ||
"expect.js": "^0.3.1", | ||
"mocha": "^2.1.0" | ||
"mocha": "^2.1.0", | ||
"sweet.js": "^0.7.3" | ||
}, | ||
"dependencies": {} | ||
"dependencies": { | ||
} | ||
} |
@@ -28,2 +28,14 @@ Compose-Function | ||
### Sweetjs | ||
```js | ||
var composition = sqr ... add2; // sqr(add2(x)) | ||
composition(2) // => 16 | ||
``` | ||
```bash | ||
$ sjs -m compose-function/macro yourfile.js | ||
``` | ||
### with curry | ||
@@ -45,2 +57,6 @@ | ||
); | ||
// or with the sweetjs macro | ||
var myFunc = curry(add, 6) ... | ||
sqr ... | ||
curry(add, 2) | ||
@@ -47,0 +63,0 @@ // map(filter(list, even), sqr) |
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
13971
11
67
4
16