MCPcopy Create free account
hub / github.com/Naios/continuable / main

Function main

examples/example-slideshow/example-slideshow.cpp:48–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46};
47
48int main(int, char**) {
49 functional_executor e;
50 auto executor = &e;
51
52 // clang-format off
53
54 (http_request("github.com") && http_request("atom.io"))
55 .then([] (std::string /*github*/, std::string /*atom*/) {
56 // ...
57 return mysql_query("select * from `users`");
58 })
59 .then([] (ResultSet /*result*/) {
60 // ...
61 }, executor->post());
62
63 // clang-format on
64
65 http_request("github.com") && http_request("atom.io");
66
67 http_request("github.com") || http_request("atom.io");
68
69 http_request("github.com") >> http_request("atom.io");
70
71 // clang-format off
72
73 read_file("entries.csv")
74 .then([] (Buffer /*buffer*/) {
75 // ...
76 return std::make_tuple("hey", true, 0);
77 })
78 .then([] (std::string /*msg*/) {
79 // ...
80 });
81
82 // clang-format on
83
84 return 0;
85}

Callers

nothing calls this directly

Calls 5

mysql_queryFunction · 0.85
read_fileFunction · 0.85
thenMethod · 0.80
postMethod · 0.80
http_requestFunction · 0.70

Tested by

no test coverage detected