source: node_modules/ramda/es/internal/_dropLastWhile.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 201 bytes
Line 
1import slice from "../slice.js";
2export default function dropLastWhile(pred, xs) {
3 var idx = xs.length - 1;
4
5 while (idx >= 0 && pred(xs[idx])) {
6 idx -= 1;
7 }
8
9 return slice(0, idx + 1, xs);
10}
Note: See TracBrowser for help on using the repository browser.