From 8f0ee1694bfb20b1c07d92c2ef46f516cbfa6f29 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 22 Nov 2021 05:59:48 +0000 Subject: (list)+example for map in main --- list.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'list.cpp') diff --git a/list.cpp b/list.cpp index df8cc13..e95a0ac 100644 --- a/list.cpp +++ b/list.cpp @@ -80,6 +80,8 @@ int main(void) std::cout << lst << std::endl; lst = reverse(lst); std::cout << lst << std::endl; + map(lst = reverse(lst), [](int x){ return x * 2; }); + std::cout << lst << std::endl; delete lst; return 0; } -- cgit v1.2.3-13-gbd6f