def fsplit(pred, objs):
t = []<EOL>f = []<EOL>for obj in objs:<EOL><INDENT>if pred(obj):<EOL><INDENT>t.append(obj)<EOL><DEDENT>else:<EOL><INDENT>f.append(obj)<EOL><DEDENT><DEDENT>return (t, f)<EOL>
Split a list into two classes according to the predicate.