逆に、次のコードでは2回ずつfが呼ばれる。
要素を参照するときに評価が起こると思えばいい。
#include <iostream>
#include <algorithm>
#include <boost/range.hpp>
#include <pstade/oven/transformed.hpp>
void dummy(int) {}
int f(int x) {
  std::cout << x << std::endl;
  return x;
}
template<typename Range>
void g(Range const& r) {
  std::for_each(boost::begin(r), boost::end(r), dummy);
  std::for_each(boost::begin(r), boost::end(r), dummy);
}
int main() {
  using namespace pstade::oven;
  const int a[] = {1, 2, 3};
  g(a | transformed(f));
}