A general theory of crossing-over