Skip to content

Commit 1a38393

Browse files
committed
minor changes
1 parent 9565006 commit 1a38393

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cpp.fp/optional/optional.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ int main(int argc, char* argv[])
2828
// and_then == bind (flatmap)
2929
auto filter = [](auto&& o) { // optional<string>,
3030
return o.and_then(to_int) // flatmap from str to int
31-
.transform([](int n) { return n + 1; })
32-
.transform([](int n) { return to_string(n); })
33-
.or_else ([] { return optional("null"s); });
31+
.transform([](auto n) { return n + 1; })
32+
.transform([](auto n) { return to_string(n); })
33+
.or_else ([] { return optional("null"s); });
3434
};
3535

3636
for (auto&& x : v | views::transform(filter))

0 commit comments

Comments
 (0)