def add_field(field, func, dict_sequence):
 for item in dict_sequence:
  if (field not in item):
   item[field] = func(item)
  (yield item)

def add_field ( field , func , dict_sequence ) : for item in dict_sequence : if ( field not in item ) : item [ field ] = func ( item ) ( yield item )
apply given function to the record and store result in given field of current record .