Skip to content

Commit 2c4d908

Browse files
committed
Lesson 21 rename
1 parent b299088 commit 2c4d908

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/applicatives-concurrent.js renamed to examples/21-applicatives-concurrent.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ const Task = require('data.task')
22

33
const Db = {
44

5+
// find project by id
56
// wrap finding into a Task
67
find: id => new Task(
78
(rej, res) => setTimeout(
8-
() => res( {id: id, title: `Project ${id}`} ),
9+
_ => res( {id: id, title: `Project ${id}`} ),
910
100
1011
)
1112
)
@@ -19,6 +20,7 @@ const reportHeader = (p1, p2) =>
1920

2021

2122
// curried Task to be applied twice
23+
// plain function inside!
2224
Task.of( p1 => p2 => reportHeader(p1, p2) )
2325

2426
// apply to both values kicked asyncronously

0 commit comments

Comments
 (0)