apply function for each table row

2012