Implemented min-max-element.