Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevemao/inspect-curry
curry with debuggable glory
https://github.com/stevemao/inspect-curry
Last synced: 6 days ago
JSON representation
curry with debuggable glory
- Host: GitHub
- URL: https://github.com/stevemao/inspect-curry
- Owner: stevemao
- Created: 2017-05-21T01:14:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-21T02:19:50.000Z (over 7 years ago)
- Last Synced: 2024-12-08T05:09:52.057Z (26 days ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Problem
```js
var add = curry(function add(x, y){ return x + y });
var map = curry(function map(f, xs){ return xs.map(f) });var inc = add(1);
```When trying to `console.log` a function we’re presented with the guts of some internal curry implementation that tells us nothing.
# Before
```js
console.log(inc)
// function f2() {
// return f1.apply(null, args.concat(Array.prototype.slice.call(arguments, 0)));
// }
```# After
```js
console.log(inc)
// map(add(1))
```See https://medium.com/@drboolean/debugging-functional-7deb4688a08c
# Related
- [inspect-compose](https://github.com/stevemao/inspect-compose)
- [composition-trace](https://github.com/stevemao/composition-trace)