#NEWLINE# def ireductions( f , seq , acc = EMPTY ) : #NEWLINE# #INDENT# it = iter ( seq ) #NEWLINE# if ( acc is EMPTY ) : #NEWLINE# #INDENT# last = next ( it ) #NEWLINE# ( yield last ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# last = acc #NEWLINE# #UNINDENT# for x in it : #NEWLINE# #INDENT# last = f ( last , x ) #NEWLINE# ( yield last )