-
Notifications
You must be signed in to change notification settings - Fork 10
/
Tasks
29 lines (23 loc) · 898 Bytes
/
Tasks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Underbar
* [ ] Implement an `.each` function
- Requires: none
## Underbar
* [ ] Implement a `.reduce` function
- Requires: _.each
## Underbar
* [ ] Implement a `.contains` function
- Requires: _.reduce
## Underbar
* [ ] Implement a `.defaults` function
- Requires: _.each
## Underbar
* [ ] Implement a `.once` function
- Requires: just some fancy smancy stuff
## Underbar
* [ ] Implement a `reduceRight` function
* Do not use any external function calls (even to helpers) within your implementation.
* `reduceRight` behaves much the same as `_.reduce`, but traverses the target in the opposite direction.
* Remember that `_.reduce` behaves differently if you do not provide it a `memo` argument:
* If no `memo` is passed, the last element is used and is never passed to the iterator.
* Note: your function only needs to work correctly on arrays.
- Requires: whatever you want