Comments (2)
Cheers,
Love the repo (utility set) by the way.
from just.
Edit: Sorry I now realize you were referring to the README example code. It was wrong and I've updated it. Thanks for the bug report!
Hi, so I think the issue is just-curry doesn't work that way. It only takes the function as an argument, then saves subsequent args until it has enough.
function add(a, b, c) {
return a + b + c;
}
curry(add)(1)(2)(3);
You want just-partial instead (note it uses undefined
and not _
for the placeholder)
const flip = require('just-flip');
const map = require('just-map-object');
const partial = require('just-partial-it');
const numbers = {x: 5, y: 10};
const flippedMap = flip(map);
const double = partial(flippedMap, (undefined, number) => number * 2);
double(numbers) // {x: 10, y: 20]
Here's the runkit...
https://runkit.com/angus-c/59e165c5dc90a9001269a7f4
Hope this helps.
from just.
Related Issues (20)
- Bug: Not loading in NextJS production mode.
- [just-diff] keep the old value in the diff HOT 1
- [Feature] Diff apply only added/updated? HOT 2
- Permutations gives incorrect result for arrays of arrays
- just-safe-set docs do not agree with implementation HOT 2
- [BUG] After `diff(object, master);` - master changed
- [just-rotate-right] Rotate array elements to the right
- [just-omit] webpack import error HOT 3
- just-diff Error when first diff is a complex array mutation
- [just-diff] op type error.I add a new property with an empty string,but the op is replace HOT 1
- Website missing one-line descriptions for each library
- `just-is-empty` function fails to detect symbol properties in objects
- Proposal: `hasOnly` object utility
- safe-set sorting bug
- Types of just-diff and just-diff-apply do not match HOT 1
- `just-standard-deviation` and `just-skewness` require 2 numbers in the array HOT 1
- Could not find a declaration file for module `just-pipe` HOT 1
- flatten with depth=1 is not properly applied to the first element HOT 1
- function just-diff is buggy when dealing with empty objects with no prototype
- just-intersect is mixing array and strings HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from just.