aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/.config/yasnippet/snippets/c++-mode/accumulate-with-closure
blob: f2fd2cd787b62475cb9d5e05e27bd112b694b76d (plain)
1
2
3
4
5
6
7
# -*- mode: snippet -*-
# name: accumulate w/ closure
# key: acl
# --
auto sum = std::accumulate(std::begin(${1:container}), std::end($1), 0, [](int total, $2) {
  $3
});