unix-conf/.emacs.d/snippets/c++-mode/accl
2016-02-18 14:53:30 +01:00

9 lines
205 B
Plaintext

# -*- 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);