wangzengdi

Results 37 comments of wangzengdi

> ``` > const callSuccessively = (f, ...args) => { > while(a = args.shift()) { > f = f(a); > } > return f; > }; > ``` > I...

@adellamaggiora Because all functions of ramda are auto curried, they do not work well together with ts. By now, one solution for ramda user is that: if a ramda api...

> By now, one solution for ramda user is that: if a ramda api used as an argument of other functions, people should always explicitly write all the parameters and...

This is a good example to show what's the most frequently problems people encounter again and again, when writing ramda with typescript: When using each ramda api separately with ts,...

Because `R.pathOr` depends on `R.path`, and `R.path`'s implementation changed in 0.27.0. Below is the key changing that lead to different results: This is `R.path` 0.26.1's implementation: https://github.com/ramda/ramda/blob/6709cb8beca00178d2288f79568cc5ca9e95d2f5/source/path.js#L29 and this is...

As the doc says: The function returned is a curried function whose arity matches that of the highest-arity predicate. isQueenOfSpades' length is 1, it only accept 1 argument, but you...

If you want to check all the items that satisfy a given predicate, you can use `R.all`, as follows: ```js const isQueen = R.propEq('rank', 'Q'); const isSpade = R.propEq('suit', '♠︎');...

When I'm not familiar with ramda, I often use `allPass`/`anyPass` in a wrong way: pass the list of predicate and the object being checked together in `allPass`/`anyPass`, as follows: ```js...