Measuring galaxy segregation with the mark connection function