.emacs.d/snippets/c++-mode/accl

9 lines
205 B
Plaintext
Raw Normal View History

2020-01-13 14:14:54 +00:00
# -*- mode: snippet -*-
# name: accumulate_lambda
# key: accl
# --
auto acc = [${3:}] (${4:auto} const& ${5:r}, ${6:auto} const& ${7:v}) {
$0
};
std::accumulate(${1:v}.begin(), $1.end(), ${2:0}, acc);