Skip to content

Commit 85abbb6

Browse files
committed
lesson 17 rename
1 parent c6442ac commit 85abbb6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// divider comes first seen as customiser
32
const modulo = dvr => dvd => dvd % dvr
43

@@ -9,25 +8,24 @@ console.log("Is 5 odd? ", Boolean(isOdd(5)))
98

109

1110
const filter = pred => xs => xs.filter(pred)
12-
1311
const getAllOdds = filter(isOdd)
14-
15-
console.log("The odds from [1,2,3,4] are: ", getAllOdds([1,2,3,4]))
12+
console.log(
13+
"The odds from [1,2,3,4] are: ",
14+
getAllOdds([1,2,3,4])
15+
)
1616

1717

1818
const replace = regex => repl => str =>
1919
str.replace(regex, repl)
2020

2121
// still accepts data 'str' as argument
2222
const censor = replace(/[aeiou]/g)('*')
23-
2423
console.log(censor('hello world'))
2524

2625

2726
const map = f => xs => xs.map(f)
2827

2928
// partially apply our 'censor' to array
3029
const censorAll = map(censor)
31-
3230
console.log(censorAll(['hello', 'world']))
3331

0 commit comments

Comments
 (0)