def make_collision_handler(collider, maplayer):
    """Returns ``f = collider.collide_map(maplayer, ...)``

    Returns:
        f : ``(last, new, vx, vy)`` -> ``(vx, vy)``

    Utility function to create a collision handler by combining

    Arguments:
       maplayer : tells the objects to collide with.
       collider : tells how velocity changes on collision and resolves
           actual collisions.
    """

    def collision_handler(last, new, vx, vy):
        return collider.collide_map(maplayer, last, new, vx, vy)

    return collision_handler