Improved signature and implementation of #operate and added
#operateOverCollection for convenience.