The current typing of the take function is this:
export function take(n: number): {
(xs: string): string;
<T>(xs: readonly T[]): T[];
};
export function take(n: number, xs: string): string;
export function take<T>(n: number, xs: readonly T[]): T[];
Right now, when you call the curried signature inside a pipe, the type of the array is not correctly inferred:

You can see the type inference is working correctly without the `R.take` call:
The solution is to change the curried signature for taking from an array to this:
export function take<T>(n:number): (xs: readonly T[]) => T[]
This also applies to takeLast.
I would be happy to open a PR for this.
The current typing of the
takefunction is this:Right now, when you call the curried signature inside a pipe, the type of the array is not correctly inferred:
The solution is to change the curried signature for taking from an array to this:
This also applies to
takeLast.I would be happy to open a PR for this.