Simplify superfluous anonymous function