#!/usr/bin/env bbx using namespace std use iostream use vector def foreach(it, list) typeof(list.begin()) it = v.begin() typeof(list.end()) end = v.end() for ; it != end; ++it int main() vector v v.push_back(1) v.push_back(2) v.push_back(3) foreach(it, v) cout << *it << " " cout << endl return 0