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

9 lines
205 B
Plaintext
Raw Normal View History

2016-02-18 13:53:30 +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);