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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
12.1)
head | 1
tail | [2, 3, 4]
12.2)
[2, 4, 6, 8]
12.3)
I fisrt put the list into the function map, because the list was not empty, I used the second definition.
I applied f to the head of the list, then I applied map onto the tail of the list.
Because the tail was not empty I repeated this again.
I repeated this until I got an empty list
Then the most recent call to map returns, and gets conncatinated to the second to last function calling f on x.
This repeates as the call stack collapses, leaving behind the list, with all values having f applied to x
8.1)
WHO KNOWS
8.2)
36
8.3) to apply a function onto a list in a specific order.
6.1)
10
6.2)
map square a | [1, 9, 25]
filter (<10) b | [1, 5]
fold (+) 0 c | 18
6.3)
A function that takes another function as an argument or a returns function as a result
15.1)
3
15.2)
fw [4, 3] | 12
fx sales | [20, 50, 32]
fz sales | 102
15.3)
This is the total of sales, the amount sold in a day perhaps
7.1)
NO CLUE
7.2)
4
7.3)
plus4 = add 4
result = plus4 6
'
11.1)
head | "Blackpool"
tail | ["Paris", "New Brighton", "Toronto"]
11.2)
A function that takes another function as an argument or a returns function as a result
11.3)
(((1 * 2) * 3) * 2)
((2 * 3) * 2)
(6 * 2)
(12)
12
|