Problem: Passing cookie to a callback is clumsy. Solution: Change function() to take arguments and return a partial.