Implement drop
robb opened this issue · comments
Robb Böhnke commented
Underscore.drop(@[ @1, @2, @3 ], 1); // 2, 3
Edit: take
totally is head
anyways
DIALLO Mamadou Bobo commented
Can't you do that using filter?
Robb Böhnke commented
Actually, it's not possible to do that only with filter
. You need access to the element's index whereas filter
only passes the element to its block.
Robb Böhnke commented
I totally failed here, take
is already implemented by head
. That being said, something like underscore.js' initial could by useful:
Underscore.initial(@[ @1, @2, @3 ], 1); // 1, 2
essentially a dropRight
Robb Böhnke commented
Fixed by @vascoorey in #42