-
Notifications
You must be signed in to change notification settings - Fork 1
/
todolist.txt
30 lines (23 loc) · 1.02 KB
/
todolist.txt
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
29
30
todolist:
1. function with first priority:
-done all -return {'23423' => {'name' => 'haha', 'hp' => '23425'}, '234232' => {} }
-done ids -return ['233423', '234134']
-done keys -return ['name', 'hp']
-done first -return: ['23423', {'name' => 'haha', 'hp' => '23425'}]
empty?
include? {|k, v| k == '2323232'}
-done find name: 'haha', hp: '2342' -return ['234232', {'name' => 'haha', 'hp' => '23425'}]
find {|k, v| k == '23423423' && v['name'] != 'haha'}
find_all name: 'haha', hp: '2342' -return [['234232', {'name' => 'haha', 'hp' => '23425'}], [], ...]
find_all {|k, v| k == '23423423' && v['name'] != 'haha'}
-return [['234232', {'name' => 'haha', 'hp' => '23425'}], [], ...]
select {|k, v| k == '2232'}
merge
2. function with normal priority:
each_key; each_value; each_pair
all? any? one? none? key?
collect {|k, v| k} map inject reduce
3. function with low priority
sort sort_by
4. add delete feature. or not? also merge!
5. changing equipment_strengthen.plist test to another. this one take 30M disk storage.