We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 493e8d6 + cf6675b commit b511737Copy full SHA for b511737
index.ts
@@ -332,6 +332,19 @@ export function foldRightFn<T, U>(
332
return array => (nativeReduceRight as (...args: any[]) => any).call(array, f, initial);
333
}
334
335
+export function foldRight1<T>(
336
+ array: ArrayLike<T>,
337
+ f: (accumulator: T, element: T, index: number) => T
338
+): T {
339
+ return (nativeReduceRight as (...args: any[]) => any).call(array, f);
340
+}
341
+
342
+export function foldRight1Fn<T>(
343
344
+): (array: ArrayLike<T>) => T {
345
+ return array => foldRight1(array, f);
346
347
348
export function foldMap<T, U>(
349
array: ArrayLike<T>,
350
f: (accumulator: U, element: U, index: number) => U,
0 commit comments