UNPKG
@pnpm/ramda
Version:
latest (0.28.1)
0.28.1
A practical functional library for JavaScript programmers.
ramdajs.com
ramda/ramda
@pnpm/ramda
/
es
/
internal
/
_dropLastWhile.js
10 lines
(8 loc)
•
201 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
slice
from
"../slice.js"
;
export
default
function
dropLastWhile
(
pred, xs
) {
var
idx = xs.
length
-
1
;
while
(idx >=
0
&&
pred
(xs[idx])) { idx -=
1
; }
return
slice
(
0
, idx +
1
, xs); }