source:
node_modules/ramda/es/internal/_dropLastWhile.js@
d24f17c
Last change on this file since d24f17c was d24f17c, checked in by , 15 months ago | |
---|---|
|
|
File size: 201 bytes |
Rev | Line | |
---|---|---|
[d24f17c] | 1 | import slice from "../slice.js"; |
2 | export 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.