Adding a generalized version of the dialectica using lists.