def sfilter(pred, brule):
 def filtered_brl(expr):
  for x in filter(pred, brule(expr)):
   (yield x)
 return filtered_brl

def sfilter ( pred , brule ) : def filtered_brl ( expr ) : for x in filter ( pred , brule ( expr ) ) : ( yield x ) return filtered_brl
yield only those results which satisfy the predicate .