-
## The Problem
Subscripts work for basic Whatever-currying - not with semilists, however. Since Whatever can be Positional-indexed but not Associative-indexed, two different but equally undesirab…
-
Ok, this one's a bit of a doozy. The 0.x Lambdeth API is similar to Lodash and doesn't allow easy currying. It's an open question whether or not implementing chaining or currying is even a good idea a…
-
Composing a curried function with removes the currying. It can easily be re-added by re-applying `curry`, but maybe that should happen automatically.
-
Would be great if one could simply call `polyval( coef )` and get a new function back with the specified coefficients. Although one can do this simply by using the `.bind()` method, I believe this wo…
-
It doesn't seem to be possible/easy to write curried functions (in `development` 97391442c465047b226935d397fdd66f458d8484 ).
I tried the following:
```
fun curry[a,b,c](f : (a,b) -> c) : a -> (b…
-
```ts
type Curry = P extends [infer H, ...infer T] ? (p: H) => Curry : R;
declare function Currying(fn: F): F extends (...P: infer A) => infer R ? Curry : never;
```
-
In relation to the tree shaking discussion in https://github.com/ramda/ramda/issues/1968, I got to thinking about to what extent currying is used by the users of Ramda. I use it a lot myself, but I wa…
-
```ts
// 3种读取函数的返回值的测试代码:
declare function f1(a: string): true // 函数声明
declare var f2: (a: string) => true // 匿名函数表达式
// 第一种,通过泛型在参数中定义。
declare function test1(fn: (...args: any[]) =>…
-
✍️ Answers
Name your title starting with the question no you are trying to answer.
For example:
`12 - my one-line solution`
```ts
type Unshift = T extends [infer K, ...infer U] ? U : …
antfu updated
3 years ago
-
```ts
type Curry =
F extends (...args: infer A) => infer R ?
(
A extends [infer Head, ...infer Tail] ?
(arg: Head) => Curry R> :
ReturnType
) :
never;
declare…